Compare commits

...

2 commits

Author SHA1 Message Date
Goodfeat
9b0b2766bd Merge branch 'Master_PR' into 'master'
Improvements and fixes to issues in the controller input menu

See merge request ryubing/ryujinx!2
2025-04-19 06:38:22 -05:00
Vova
6bc0429cbb async methods have been removed 2025-04-19 21:37:56 +10:00

View file

@ -357,6 +357,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
// This function allows you to output a message about the device configuration found in the file
// NOTE: if the configuration is found, we display the message "Waiting for controller connection",
// but only if the id gamepad belongs to the selected player
NotificationIsVisible = Config != null && Devices.FirstOrDefault(d => d.Id == Config.Id).Id != Config.Id && Config.PlayerIndex == PlayerId;
if (NotificationIsVisible)
{
@ -369,6 +370,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
NotificationText = $"{LocaleManager.Instance[LocaleKeys.ControllerSettingsWaitingConnectDevice].Format(Config.Name, Config.Id)}";
}
}
}
@ -457,11 +459,10 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
}
private async void HandleOnGamepadDisconnected(string id)
private void HandleOnGamepadDisconnected(string id)
{
_isChangeTrackingActive = false; // Disable configuration change tracking
await Dispatcher.UIThread.InvokeAsync(() =>
{
LoadDevices();
IsModified = true;
@ -469,22 +470,20 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
FindPairedDeviceInConfigFile();
_isChangeTrackingActive = true; // Enable configuration change tracking
return System.Threading.Tasks.Task.CompletedTask;
});
}
private async void HandleOnGamepadConnected(string id)
private void HandleOnGamepadConnected(string id)
{
_isChangeTrackingActive = false; // Disable configuration change tracking
await Dispatcher.UIThread.InvokeAsync(() =>
{
LoadDevices();
IsModified = true;
RevertChanges();
_isChangeTrackingActive = true;// Enable configuration change tracking
});
}
private string GetCurrentGamepadId()