1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-17 16:16:38 +00:00

Dirty on input map bindings change

This commit is contained in:
Isaac Marovitz 2024-04-20 12:32:57 -04:00
parent a3b50fb28d
commit 3b60e8f590
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
3 changed files with 14 additions and 2 deletions

View file

@ -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;

View file

@ -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)
{

View file

@ -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)
{