Compare commits

...

3 commits

Author SHA1 Message Date
Tartifless
990d75983c Merge branch 'master' into 'master'
sdl2 guid, remove the CRC bytes (4 first characters) and replace with 0000 when creating guid

See merge request ryubing/ryujinx!2
2025-03-18 06:52:01 +00:00
Tartifless
cb154e979b Merge branch ryujinx:master into master 2025-03-17 17:50:51 +00:00
Tartifless
f5b6c872d7 Update file SDL2GamepadDriver.cs 2025-03-13 16:55:31 +00:00

View file

@ -57,16 +57,19 @@ namespace Ryujinx.Input.SDL2
return null;
}
// Remove the first 4 char of the guid (CRC part) to make it stable
string guidString = "0000" + guid.ToString().Substring(4);
string id;
lock (_lock)
{
int guidIndex = 0;
id = guidIndex + "-" + guid;
id = guidIndex + "-" + guidString;
while (_gamepadsIds.Contains(id))
{
id = (++guidIndex) + "-" + guid;
id = (++guidIndex) + "-" + guidString;
}
}