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