diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-05 15:51:57 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-05 16:23:50 +0100 |
commit | c7ba01b034ab67b1343bc728bd058c47eb48efc4 (patch) | |
tree | 130781cee8e0b7f8f00162dfb2e895211d4e097f /src/core/Pad.cpp | |
parent | MP3 player fixes (diff) | |
download | re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.gz re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.bz2 re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.lz re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.xz re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.zst re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.zip |
Diffstat (limited to 'src/core/Pad.cpp')
-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 9bcac613..60bb7a76 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -1028,8 +1028,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) |