[patch] Fix adding/removing DirectInput joysticks

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.

Your bugzilla post is the right place to start. This bug has been around for years and needs fixing. Hopefully someone will join in on your post and get a patch actioned.