| Summary: | SDL_GameControllerOpen fails if the joystick subsystem isn't initialized | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Bastien Dejean <nihilhill> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: | Patch used to trigger the failure | ||
Maybe the fault is in the SDL_VIDEO_DRIVER_WINDOWS section in SDL_InitSubSystem() of "src/SDL.c". Because there only SDL_INIT_JOYSTICK is checked. The flags are adapted for SDL_INIT_GAMECONTROLLER afterwards. Fixed, thanks! https://hg.libsdl.org/SDL/rev/1dfa58e94f88 |
Created attachment 2585 [details] Patch used to trigger the failure Steps to reproduce: cd test patch testgamecontroller.c < ATTACHED_PATCH make testgamecontroller ./testgamecontroller 0 (Please also note that the error message (IDirectInputDevice8::SetCooperativeLevel() DirectX error 0xx) doesn't provide any error code.)