diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 17:50:26 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 19:10:52 +0100 |
commit | 0ec16a5b0ecb85808553141c2657c957fc585dc9 (patch) | |
tree | 9a43d027d20a5a8529f1c7c2ff67e1d6dc518935 /src/core/MenuScreensCustom.cpp | |
parent | Fix sha1 on premake linux (diff) | |
download | re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar.gz re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar.bz2 re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar.lz re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar.xz re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.tar.zst re3-0ec16a5b0ecb85808553141c2657c957fc585dc9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/MenuScreensCustom.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp index a5dbd0d5..cdfb3c85 100644 --- a/src/core/MenuScreensCustom.cpp +++ b/src/core/MenuScreensCustom.cpp @@ -351,11 +351,8 @@ wchar* DetectJoystickDraw(bool* disabled, bool userHovering) { } } if (found != -1 && CPad::XInputJoy1 != found) { - if (CPad::XInputJoy1 != -1 && CPad::XInputJoy1 != found) - CPad::XInputJoy2 = CPad::XInputJoy1; - else - CPad::XInputJoy2 = -1; - + // We should never leave pads -1, so we can process them when they're connected and kinda support hotplug. + CPad::XInputJoy2 = (CPad::XInputJoy1 == -1 ? (found + 1) % 4 : CPad::XInputJoy1); CPad::XInputJoy1 = found; cachedButtonNum = 0; // fake too, because xinput bypass CControllerConfig } |