more XI/DI tweaking

This commit is contained in:
pinumbernumber 2013-08-27 20:25:50 +01:00
parent dca8dd0f3b
commit fee0bdd228
2 changed files with 2 additions and 2 deletions

View File

@ -562,7 +562,7 @@ static void dinput_joypad_poll(void)
{ {
struct dinput_joypad *pad = &g_pads[i]; struct dinput_joypad *pad = &g_pads[i];
if (pad->joypad) if ((pad->joypad) && (g_xbox_pad_indexes[i] == -1))
{ {
memset(&pad->joy_state, 0, sizeof(pad->joy_state)); memset(&pad->joy_state, 0, sizeof(pad->joy_state));

View File

@ -315,7 +315,7 @@ static void winxinput_joypad_poll(void)
{ {
for (unsigned i = 0; i < 4; ++i) for (unsigned i = 0; i < 4; ++i)
if (g_winxinput_states[i].connected) if (g_winxinput_states[i].connected)
if (g_XInputGetStateEx(i, &(g_winxinput_states[i].xstate)) == ERROR_DEVICE_NOT_CONNECTED) if (g_XInputGetStateEx(i, &(g_winxinput_states[i].xstate)) != ERROR_SUCCESS)
g_winxinput_states[i].connected = false; g_winxinput_states[i].connected = false;
dinput_joypad.poll(); dinput_joypad.poll();