mirror of
https://git.ryujinx.app/projects/Ryubing.git
synced 2026-10-22 10:12:22 -05:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
1 parent
6de3afc43d
commit
52f42d450f
1 file changed
+4
-1
@@ -115,7 +115,10 @@ namespace Ryujinx.Input.SDL2
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||
if (joystickDeviceId <= _gamepadsIds.FindLastIndex(_ => true))
|
||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||
else
|
||||
_gamepadsIds.Add(id);
|
||||
}
|
||||
|
||||
OnGamepadConnected?.Invoke(id);
|
||||
|
||||
Reference in new issue
Block a user