mirror of
https://github.com/GTAmodding/re3.git
synced 2025-08-29 01:30:49 +00:00
Fix XInput hotplug
This commit is contained in:
parent
80e4b3db55
commit
0ec16a5b0e
2 changed files with 10 additions and 5 deletions
|
@ -279,6 +279,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue