mirror of https://github.com/encounter/SDL.git
Fix adding of XInput devices (thanks, Mitchell!)
Partially fixes Bugzilla #2126.
This commit is contained in:
parent
ade13fd741
commit
5e74299a83
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue