mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-25 01:53:05 +00:00
Dirty on input map bindings change
This commit is contained in:
parent
a3b50fb28d
commit
3b60e8f590
3 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue