mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-24 02:00:11 +01:00
try 1: Fix IndexOutOfBounds in SDL2GamepadDriver.cs
This commit is contained in:
parent
6de3afc43d
commit
52f42d450f
@ -115,7 +115,10 @@ namespace Ryujinx.Input.SDL2
|
|||||||
{
|
{
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
_gamepadsIds.Insert(joystickDeviceId, id);
|
if (joystickDeviceId <= _gamepadsIds.FindLastIndex(_ => true))
|
||||||
|
_gamepadsIds.Insert(joystickDeviceId, id);
|
||||||
|
else
|
||||||
|
_gamepadsIds.Add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
OnGamepadConnected?.Invoke(id);
|
OnGamepadConnected?.Invoke(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user