diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/Pad.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 5c79c0d3..e75510e5 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -1585,8 +1585,14 @@ void CPad::AddToPCCheatString(char c) } #ifdef XINPUT +int CPad::XInputJoy1 = 0; +int CPad::XInputJoy2 = 1; void CPad::AffectFromXinput(uint32 pad) { + pad = pad == 0 ? XInputJoy1 : XInputJoy2; + if (pad == -1) // LoadINIControllerSettings can set it to -1 + return; + XINPUT_STATE xstate; memset(&xstate, 0, sizeof(XINPUT_STATE)); if (XInputGetState(pad, &xstate) == ERROR_SUCCESS) |