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
[patch] Fix adding/removing DirectInput joysticks
Jimbly


Joined: 28 Mar 2016
Posts: 2
Location: Nomadic
I can't find any info on how to contribute to SDL (wiki just talks about how to contribute to the wiki), not sure if there's anything akin to pull requests or a better process to use, so I mimicked what I saw some others do and made a bug with an attachment here: https://bugzilla.libsdl.org/show_bug.cgi?id=3299 Not sure if the forums or the bug are the most appropriate place to discuss this, so posting this quick message to the forums as well. The quick summary of the issue is: DirectInput GUIDs, after plugging in a new joystick, do not seem to map to the same joysticks they did a moment ago, so SDL opens the wrong joysticks (opening just the new joystick actually opens the same joystick twice, as the "new" GUID is actually mapping to one of the joysticks that were already plugged in). The fix appears to be to use HID paths, instead of GUIDs, to identify unique joysticks across device changes.