diff --git a/src/Ryujinx/UI/ViewModels/Settings/SettingsInputViewModel.cs b/src/Ryujinx/UI/ViewModels/Settings/SettingsInputViewModel.cs index 32a6c749a7..f7a6cbdae7 100644 --- a/src/Ryujinx/UI/ViewModels/Settings/SettingsInputViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/Settings/SettingsInputViewModel.cs @@ -57,6 +57,17 @@ namespace Ryujinx.Ava.UI.ViewModels.Settings private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions()); + private bool _isModified; + public bool IsModified + { + get => _isModified; + set + { + _isModified = value; + DirtyEvent?.Invoke(); + } + } + public IGamepadDriver AvaloniaKeyboardDriver { get; } public IGamepad SelectedGamepad { get; private set; } @@ -836,6 +847,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Settings { bool isDirty = false; + isDirty |= IsModified; isDirty |= config.System.EnableDockedMode.Value != EnableDockedMode; isDirty |= config.Hid.EnableKeyboard.Value != EnableKeyboard; isDirty |= config.Hid.EnableMouse.Value != EnableMouse; diff --git a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs index d4012c23fc..b76648da77 100644 --- a/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/ControllerInputView.axaml.cs @@ -71,7 +71,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (e.ButtonValue.HasValue) { var buttonValue = e.ButtonValue.Value; - //viewModel.ParentModel.SettingsViewModel.CheckIfModified(); + viewModel.ParentModel.IsModified = true; switch (button.Name) { diff --git a/src/Ryujinx/UI/Views/Input/KeyboardInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/KeyboardInputView.axaml.cs index ff83d487e8..f17c7496ca 100644 --- a/src/Ryujinx/UI/Views/Input/KeyboardInputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/KeyboardInputView.axaml.cs @@ -68,7 +68,7 @@ namespace Ryujinx.Ava.UI.Views.Input if (e.ButtonValue.HasValue) { var buttonValue = e.ButtonValue.Value; - // viewModel.ParentModel.SettingsViewModel.CheckIfModified(); + viewModel.ParentModel.IsModified = true; switch (button.Name) {