(XDK joypad) Cleanups

This commit is contained in:
twinaphex 2018-01-20 17:59:59 +01:00
parent e1ec0e578c
commit 41575a63ac

View File

@ -199,14 +199,17 @@ static void xdk_joypad_poll(void)
* the device handle will be NULL. */
if (XInputPoll(gamepads[port]) != ERROR_SUCCESS)
continue;
if (XInputGetState(gamepads[port], &state_tmp) != ERROR_SUCCESS)
continue;
#elif defined(_XBOX360)
if (XInputGetState(port, &state_tmp) == ERROR_DEVICE_NOT_CONNECTED)
continue;
#endif
if (XInputGetState(
#ifdef _XBOX
gamepads[port]
#else
port
#endif
, &state_tmp) == ERROR_DEVICE_NOT_CONNECTED)
continue;
state_cur = &pad_state[port];
*state_cur = 0;