Closed oncer closed 1 year ago
A mere hours left before the IGF submission deadline, and after over a year of no reports, this tester comes up with these constant crashes in EnumDevices. I was absolutely clueless and couldn't reproduce it, so it was really hard to figure out why it would break. And then of course, I find this magical patch! Thank you so much for this :)
Calling
Gamepad_detectDevices()
in a thread loop to enable gamepad hotplugging will currently cause problems on some systems because of theIDirectInput_EnumDevices
call. Some USB sound cards, speakers, microphones, or keyboards will act strangely if you do this too often.This code I borrowed from SDL2 will only call
IDirectInput_EnumDevices
if an input device was either plugged in or unplugged since the last call. This is done with theRegisterDeviceNotification
call essentially.