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

@ -1,6 +1,7 @@
using Avalonia.Controls;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.Systems.Configuration;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Models;
@ -14,7 +15,7 @@ namespace Ryujinx.Ava.UI.Views.Input
public InputView()
{
ViewModel = new InputViewModel(this);
ViewModel = new InputViewModel(this, ConfigurationState.Instance.System.UseInputGlobalConfig.Value);
InitializeComponent();
}
@ -24,6 +25,14 @@ namespace Ryujinx.Ava.UI.Views.Input
ViewModel.Save();
}
public void ToggleLocalGlobalInput(bool enableConfigGlobal)
{
Dispose();
ViewModel = new InputViewModel(this, enableConfigGlobal); // Create new Input Page with other input configs
InitializeComponent();
}
private async void PlayerIndexBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (PlayerIndexBox != null)