diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-05 15:51:57 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-07 17:50:17 +0100 |
commit | 675aef29cf85f956052a150792d4d56f91ff692c (patch) | |
tree | 01de3ea8fdd82b15ce68509e6179ab5b3515f393 /src/core/Pad.cpp | |
parent | reorganize shaders; use modulate flag; update librw (diff) | |
download | re3-675aef29cf85f956052a150792d4d56f91ff692c.tar re3-675aef29cf85f956052a150792d4d56f91ff692c.tar.gz re3-675aef29cf85f956052a150792d4d56f91ff692c.tar.bz2 re3-675aef29cf85f956052a150792d4d56f91ff692c.tar.lz re3-675aef29cf85f956052a150792d4d56f91ff692c.tar.xz re3-675aef29cf85f956052a150792d4d56f91ff692c.tar.zst re3-675aef29cf85f956052a150792d4d56f91ff692c.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 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) |