summaryrefslogtreecommitdiffstats
path: root/src/core/re3.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-12 17:50:26 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-12 17:50:26 +0100
commit6689b0be0201cb6a5c198701b9dc6efb9af33d5a (patch)
tree5c65e022f17bd59f249b69203c07b332a54350dd /src/core/re3.cpp
parentMerge pull request #1029 from erorcun/master (diff)
downloadre3-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/re3.cpp')
-rw-r--r--src/core/re3.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 7f7f1f83..6de079e8 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -336,6 +336,14 @@ void LoadINIControllerSettings()
CPad::XInputJoy2 = i;
}
}
+
+ // There is no plug event on XInput, so let's leave XInputJoy1/2 as 0/1 respectively, and hotplug will be possible.
+ if (CPad::XInputJoy1 == -1) {
+ CPad::XInputJoy1 = 0;
+ CPad::XInputJoy2 = 1;
+ } else if (CPad::XInputJoy2 == -1) {
+ CPad::XInputJoy2 = (CPad::XInputJoy1 + 1) % 4;
+ }
}
#else
ReadIniIfExists("Controller", "JoystickName", gSelectedJoystickName, 128);