Open weirddan455 opened 2 months ago
Try setting SDL_HINT_JOYSTICK_THREAD
?
Can reproduce this and I can also confirm that adding the hint fixes that.
@slouken, why is that? The only documentation I have found is that this processes events on a new thread, but nothing on why events can't be processed on Windows without it. I have tried manually calling updateGamepad
, PollEvent
, and PumpEvents()
to no luck, only adding _INIT_VIDEO
or the THREAD
hint as you mentioned actually work.
I can also confirm this works on Linux without video or the hint as well
Tested with an Xbox One S controller on Windows 10. For some reason, only my trigger button events show up (axis 4 and axis 5 for this controller). Other buttons and axes do not generate events when pressed.
Linux does not have this issue. All buttons and axes show up correctly even without the video being initialized.
Reproduction case follows. Replacing the first line with
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
allows all buttons and axes to generate events.