Fix: Input page is saved only when input is changed

This is an attempt to decouple "saving gamepad settings" from the rest of the emulator settings. Should fix the issue where the gamepad was not detected when starting the emulator and the game (usually after saving settings with the gamepad turned off)
This commit is contained in:
Vova
2025-02-18 19:28:13 +10:00
parent 52b0b45d34
commit 3e69afd110
4 changed files with 36 additions and 4 deletions

View File

@@ -60,6 +60,8 @@ namespace Ryujinx.Ava.UI.Views.Input
PointerPressed += MouseClick;
FlagInputConfigChanged();
if (DataContext is not KeyboardInputViewModel viewModel)
return;
@@ -184,6 +186,11 @@ namespace Ryujinx.Ava.UI.Views.Input
}
}
private void FlagInputConfigChanged()
{
(DataContext as KeyboardInputViewModel)!.ParentModel.IsInputConfigChanged = true;
}
private void MouseClick(object sender, PointerPressedEventArgs e)
{
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;