The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Is it possible to hot swap a joystick using SDL 1.2.14-3?
CharleneNorris


Joined: 24 Sep 2014
Posts: 1
Sorry to be a bother, but I've inherited a joystick program that is causing a product shipment to be delayed. In addition, I have no support whatsoever as the programmers who did the work are long gone and I'm new to SDL. The joystick is installed on a 64-bit Linux box running RHEL 6.1 with some 6.4 kernel patches thrown-in. Apparently, the customer neglected to tell us that they need to be able to hot swap the joystick. So, I'd very much appreciate some advice about how to best/fastest way to go about upgrading the existing SDL joystick code to support this feature. It looks to me like udev is the best way, but it also appears that udev support is an SDL 2.x feature not found in the 1.2.x product. I looked at events in 1.2.x, but it looks like there are only 4 supported events and none of them have anything to do with device IDs / swap events. Is there something I'm overlooking that would allow me to stay with 1.2.14 (or 1.2.15) and avoid having to deal with updating the API calls to be compatible with 2.x?

Thanks much.