Fix adding of XInput devices (thanks, Mitchell!)

Partially fixes Bugzilla #2126.
This commit is contained in:
Ryan C. Gordon 2013-10-20 15:40:20 -04:00
parent ade13fd741
commit 5e74299a83
1 changed files with 1 additions and 1 deletions

View File

@ -733,11 +733,11 @@ AddXInputDevice(const Uint8 userid, JoyStick_DeviceData **pContext)
pNewJoystick->pNext = SYS_Joystick; pNewJoystick->pNext = SYS_Joystick;
SYS_Joystick = pNewJoystick; SYS_Joystick = pNewJoystick;
return; /* already in the list. */
} }
pPrevJoystick = pNewJoystick; pPrevJoystick = pNewJoystick;
pNewJoystick = pNewJoystick->pNext; pNewJoystick = pNewJoystick->pNext;
return; /* already in the list. */
} }
pNewJoystick = (JoyStick_DeviceData *) SDL_malloc(sizeof (JoyStick_DeviceData)); pNewJoystick = (JoyStick_DeviceData *) SDL_malloc(sizeof (JoyStick_DeviceData));