| Summary: | Removed joysticks should center their inputs | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ryan C. Gordon <icculus> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | target-2.0.14 |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Ryan C. Gordon
2020-03-26 20:49:42 UTC
Gonna assign this to myself in case this is quick to implement right now. --ryan. Oh, it turns out we already do this (grep for "force_recentering") but we send these recentering events _after_ SDL_JOYDEVICEREMOVED, which is a problem in the _opposite_ direction; if you handle hotplugging, you probably closed the joystick by the time these would show up. Going to move the force_recentering code to a separate function, so the removal code can call it directly. Also, force_recentering is only set in one other place (DARWIN_JoystickUpdate), and for the same reason: device removal. We should probably clean that out eventually too. --ryan. Fixed in https://hg.libsdl.org/SDL/rev/9adcb74f0be2 --ryan. |