Fix adding of XInput devices (thanks, Mitchell!)
authorRyan C. Gordon <icculus@icculus.org>
Sun, 20 Oct 2013 15:40:20 -0400
changeset 7844 97fa86ce5a2e
parent 7843 9e7a3c4b7267
child 7845 b92b8c52946c
Fix adding of XInput devices (thanks, Mitchell!) Partially fixes Bugzilla #2126.
src/joystick/windows/SDL_dxjoystick.c
--- a/src/joystick/windows/SDL_dxjoystick.c	Sun Oct 20 10:39:26 2013 -0700
+++ b/src/joystick/windows/SDL_dxjoystick.c	Sun Oct 20 15:40:20 2013 -0400
@@ -733,11 +733,11 @@
 
             pNewJoystick->pNext = SYS_Joystick;
             SYS_Joystick = pNewJoystick;
+            return;   /* already in the list. */
         }
 
         pPrevJoystick = pNewJoystick;
         pNewJoystick = pNewJoystick->pNext;
-        return;   /* already in the list. */
     }
 
     pNewJoystick = (JoyStick_DeviceData *) SDL_malloc(sizeof (JoyStick_DeviceData));