Fixed review findings

This commit is contained in:
Rafał Gierszewski 2022-06-14 23:34:06 +02:00
parent 11868e49c0
commit af3fec2c3f

View file

@ -79,10 +79,12 @@ namespace Ryujinx.Input.SDL2
return; return;
} }
// sometimes a JoyStick connected event fires after the app starts even though it was connected before // Sometimes a JoyStick connected event fires after the app starts even though it was connected before
// so it is rejected to avoid doubling the entries // so it is rejected to avoid doubling the entries.
if (_gamepadsIds.Contains(id)) if (_gamepadsIds.Contains(id))
{
return; return;
}
if (_gamepadsInstanceIdsMapping.TryAdd(joystickInstanceId, id)) if (_gamepadsInstanceIdsMapping.TryAdd(joystickInstanceId, id))
{ {