diff --git a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs index 21ebcdd33..8cb780152 100644 --- a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs @@ -465,7 +465,15 @@ namespace Ryujinx.Ava.UI.ViewModels.Input await Dispatcher.UIThread.InvokeAsync(() => { LoadDevices(); + + if (Config != null) + { + // Load configuration after disconnection if it is in the configuration file + IsModified = true; + LoadSavedConfiguration(); + } FindPairedDevice(); + _isChangeTrackingActive = true; return System.Threading.Tasks.Task.CompletedTask; }); @@ -474,7 +482,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input private async void HandleOnGamepadConnected(string id) { _isChangeTrackingActive = false; - await Dispatcher.UIThread.InvokeAsync(() => { LoadDevices(); @@ -485,7 +492,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input IsModified = true; LoadSavedConfiguration(); } - _isChangeTrackingActive = true; }); } @@ -847,6 +853,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input { _isLoaded = false; + config.Id = null; // ignore device IDs (there is no longer a need to store device IDs for presets due to their independence from devices) + LoadConfiguration(config); // This line of code hard-links profiles to controllers, the commented line allows profiles to be applied to all controllers