| Summary: | SDL_JOYDEVICEREMOVED not triggering | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X 10.7 | ||
| Attachments: | Simple program used to test joystick add/remove events. | ||
This appears to be fixed as of revision 141ffce8bb59 (http://hg.libsdl.org/SDL/rev/141ffce8bb59) |
Created attachment 1107 [details] Simple program used to test joystick add/remove events. On my system (MBP with Mac OS 10.8.3, using a wired Xbox 360 controller with the tattiebogle driver), SDL_JOYDEVICEADDED is triggered correctly when the controller is plugged in, but SDL_JOYDEVICEREMOVED never happens when I unplug it. This results in a buildup of 'ghost joysticks' when the controller is unplugged and re-plugged multiple times. I dug a little bit into the SDL2 source, and it seems joystick->hwdata->removed is being set properly, but SDL_SYS_JoystickUpdate (which does the actual removal and event triggering) is apparently not being called at all when that happens. I have only tested this in Mac OS 10.8.3.