mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02:00
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
This commit is contained in:
commit
b164ca783e
1 changed files with 5 additions and 2 deletions
|
@ -57,16 +57,19 @@ namespace Ryujinx.Input.SDL2
|
||||||
return null;
|
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;
|
string id;
|
||||||
|
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
int guidIndex = 0;
|
int guidIndex = 0;
|
||||||
id = guidIndex + "-" + guid;
|
id = guidIndex + "-" + guidString;
|
||||||
|
|
||||||
while (_gamepadsIds.Contains(id))
|
while (_gamepadsIds.Contains(id))
|
||||||
{
|
{
|
||||||
id = (++guidIndex) + "-" + guid;
|
id = (++guidIndex) + "-" + guidString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue