diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 17:50:26 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-12 17:50:26 +0100 |
commit | 6689b0be0201cb6a5c198701b9dc6efb9af33d5a (patch) | |
tree | 5c65e022f17bd59f249b69203c07b332a54350dd /src/core/MenuScreensCustom.cpp | |
parent | Merge pull request #1029 from erorcun/master (diff) | |
download | re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar.gz re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar.bz2 re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar.lz re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar.xz re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.tar.zst re3-6689b0be0201cb6a5c198701b9dc6efb9af33d5a.zip |
Diffstat (limited to 'src/core/MenuScreensCustom.cpp')
-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 069cbdef..6e23f76a 100644 --- a/src/core/MenuScreensCustom.cpp +++ b/src/core/MenuScreensCustom.cpp @@ -333,11 +333,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 } |