Added the ability to switch between local and global input in the user configuration

See merge request ryubing/ryujinx!8
This commit is contained in:
Goodfeat 2025-06-09 17:24:24 -05:00 committed by GreemDev
parent ef02194a77
commit d31d1f91cf
14 changed files with 250 additions and 61 deletions

View file

@ -28,6 +28,8 @@ namespace Ryujinx.Ava.UI.Windows
ViewModel.CloseWindow += Close;
ViewModel.SaveSettingsEvent += SaveSettings;
ViewModel.LocalGlobalInputSwitchEvent += ToggleLocalGlobalInput;
InitializeComponent();
Load();
}
@ -37,9 +39,14 @@ namespace Ryujinx.Ava.UI.Windows
InputPage.InputView?.SaveCurrentProfile();
}
public void ToggleLocalGlobalInput(bool enableConfigGlobal)
{
InputPage.InputView?.ToggleLocalGlobalInput(enableConfigGlobal);
}
private void Load()
{
Pages.Children.Clear();
Pages.Children.Clear();
NavPanel.SelectionChanged += NavPanelOnSelectionChanged;
NavPanel.SelectedItem = NavPanel.MenuItems.ElementAt(0);
}
@ -90,6 +97,7 @@ namespace Ryujinx.Ava.UI.Windows
protected override void OnClosing(WindowClosingEventArgs e)
{
Program.SetUseExtraConfig(false);
InputPage.Dispose(); // You need to unload the gamepad settings, otherwise the controls will be blocked
base.OnClosing(e);
}