[SDL] Resend (x2) Patch - Joystick ReSync on SYN_DROPPED

jeffgriffin libsdl at brainslugsolutions.com
Tue Mar 12 15:41:44 PDT 2013

Thanks for this patch!  It really helped me with some issues I was having with gamepads in XBMC.
I did have to make a couple tweaks, though:
1. I placed the PollAllValues for a "fresh" device inside the read loop.  This was because it would fire an axis value of zero for any gamepad which was disconnected.  This would not be a problem but for the fact that zero is not the resting point for some axes, therefore disconnected controllers constantly appear to be in a modified state.  This way, fresh devices will be polled once they have sent the first real event.
2. Added button states to PollAllValues.  This fixes an issue in XBMC where dropped button up events cause the button to "stick".  A key_map value 0 can only mean "unmapped" in this patch, as opposed to both "unmapped" and "key 0".

You can see these changes here (https://github.com/jeffgriffin/OpenELEC.tv/blob/quart/packages/multimedia/SDL/patches/SDL-1.2.15-stuck_button_fix.patch).  Patch is applied to SDL-1.2.15, to keep me from needing to move my XBMC build onto the dev cut of SDL.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130312/9342388e/attachment-0008.htm>

More information about the SDL mailing list