Hotplugging joystick events getting consumed
-
I'm attempting to make use of the joystick device adding and removal events from the SDL library within a Qt application. The things works great if it's plugged in when I launch the app i.e. I can get joystick inputs all day long. But for some weird reason, the device add and device removal events never get to my poll event loop. I've tried a number of things such as having the event polling in a timer and making the whole thing a QThread. To make matters worse, if I put my joystick code in a dead-simple hello-world type Qt app, it works fine.
So, it would seem that somewhere in the swamp of a much larger application, the events are getting consumed or filtered out. Does Qt even look at device connection/disconnection events?
-
I solved it by upgrading from SDL 2.0.3 to SDL 2.0.4.