Parcourir la source

Fix adding of XInput devices (thanks, Mitchell!)

Partially fixes Bugzilla #2126.
Ryan C. Gordon il y a 12 ans
Parent
commit
5e74299a83
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/joystick/windows/SDL_dxjoystick.c

+ 1 - 1
src/joystick/windows/SDL_dxjoystick.c

@@ -733,11 +733,11 @@ AddXInputDevice(const Uint8 userid, JoyStick_DeviceData **pContext)
 
             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));