mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-11 07:45:48 +00:00
fix: gamepads have the same name (#27)
When connecting multiple controllers of the same model, the first device's name ends with (0), the second with (1), the third with (1), the fourth with (1), and so on. To ensure these names are truly unique, GetUniqueGamepadName is now called recursively. Before:  After:  Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/27
This commit is contained in:
@@ -574,7 +574,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||
if (Devices.Any(controller => controller.Name == name))
|
||||
{
|
||||
controllerNumber++;
|
||||
name = GetGamepadName(gamepad, controllerNumber);
|
||||
name = GetUniqueGamepadName(gamepad, ref controllerNumber);
|
||||
}
|
||||
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user