(Xbox 360) Buildfixes

This commit is contained in:
twinaphex 2018-01-20 23:42:10 +01:00
parent 983617372a
commit 932904e07e

View File

@ -85,8 +85,7 @@ static const uint16_t button_index_to_bitmap_code[] = {
XINPUT_GAMEPAD_START,
XINPUT_GAMEPAD_BACK,
XINPUT_GAMEPAD_LEFT_THUMB,
XINPUT_GAMEPAD_RIGHT_THUMB,
XINPUT_GAMEPAD_GUIDE
XINPUT_GAMEPAD_RIGHT_THUMB
};
#endif
@ -149,7 +148,7 @@ static bool xdk_joypad_button(unsigned port_num, uint16_t joykey)
break;
}
#else
if (joykey < num_buttons)
if (joykey < 10)
return btn_word & button_index_to_bitmap_code[joykey];
#endif
@ -291,7 +290,7 @@ static void xdk_joypad_poll(void)
g_xinput_states[port].connected = !
(XInputGetState(
#ifdef _XBOX
#ifdef _XBOX1
gamepads[port]
#else
port