diff --git a/assets/locales.json b/assets/locales.json index 75bb4e761..2dc760a7a 100644 --- a/assets/locales.json +++ b/assets/locales.json @@ -6522,6 +6522,31 @@ "zh_TW": "輸入" } }, + { + "ID": "SettingsTabInputUseGlobalInput", + "Translations": { + "ar_SA": "إدخال عالمي", + "de_DE": "Globale Eingabe", + "el_GR": "Παγκόσμια εισαγωγή", + "en_US": "Global Input", + "es_ES": "Entrada Global", + "fr_FR": "Saisie Globale", + "he_IL": "קלט גלובלי", + "it_IT": "Input Globale", + "ja_JP": "グローバル入力", + "ko_KR": "글로벌 입력", + "no_NO": "Global Inndata", + "pl_PL": "Globalny Wpis", + "pt_BR": "Entrada Global", + "ru_RU": "Глобальный Ввод", + "sv_SE": "Global Input", + "th_TH": "การป้อนข้อมูลแบบโกลบอล", + "tr_TR": "Küresel Girdi", + "uk_UA": "Глобальний Ввід", + "zh_CN": "全局输入", + "zh_TW": "全域輸入" + } + }, { "ID": "SettingsTabInputEnableDockedMode", "Translations": { @@ -16272,6 +16297,31 @@ "zh_TW": "瀏覽自訂 GUI 佈景主題" } }, + { + "ID": "UseGlobalInputTooltip", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "If this option is enabled in custom settings, the global input configuration will be used.\n\nIn the global settings: you can enable or disable it as needed; this setting will be inherited by any new custom configurations created.", + "es_ES": "", + "fr_FR": "", + "he_IL": "", + "it_IT": "", + "ja_JP": "", + "ko_KR": "", + "no_NO": "", + "pl_PL": "", + "pt_BR": "", + "ru_RU": "Если эта опция включена в пользовательских настройках, будет использована глобальная конфигурация ввода.\n\nВ глобальных настройках: переключите эту опцию по своему усмотрению, это будет унаследовано для вновь созданых пользовательских конфигураций", + "sv_SE": "", + "th_TH": "", + "tr_TR": "", + "uk_UA": "", + "zh_CN": "", + "zh_TW": "" + } + }, { "ID": "DockModeToggleTooltip", "Translations": { diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 016cc348a..ec3926b06 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -25,6 +25,7 @@ using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Threading.Tasks; +using Silk.NET.Vulkan; namespace Ryujinx.Ava { @@ -35,6 +36,7 @@ namespace Ryujinx.Ava public static string Version { get; private set; } public static string ConfigurationPath { get; private set; } public static string GlobalConfigurationPath { get; private set; } + public static bool UseExtraConfig{ get; private set; } public static bool PreviewerDetached { get; private set; } public static bool UseHardwareAcceleration { get; private set; } public static string BackendThreadingArg { get; private set; } @@ -160,6 +162,7 @@ namespace Ryujinx.Ava } } + public static string GetDirGameUserConfig(string gameId, bool rememberGlobalDir = false, bool changeFolderForGame = false) { if (string.IsNullOrEmpty(gameId)) @@ -169,24 +172,22 @@ namespace Ryujinx.Ava string gameDir = Path.Combine(AppDataManager.GamesDirPath, gameId, ReleaseInformation.ConfigName); - // Should load with the game if there is a custom setting for the game - if (rememberGlobalDir) - { - GlobalConfigurationPath = ConfigurationPath; - } - if (changeFolderForGame) { ConfigurationPath = gameDir; + UseExtraConfig = true; } return gameDir; } - public static void ReloadConfig() + public static void SetUseExtraConfig(bool value) + { + UseExtraConfig = value; + } + + public static void ReloadConfig(bool rememberGlobalDir = false) { - //It is necessary that when a user setting appears, the global setting remains available - GlobalConfigurationPath = null; string localConfigurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ReleaseInformation.ConfigName); string appDataConfigurationPath = Path.Combine(AppDataManager.BaseDirPath, ReleaseInformation.ConfigName); @@ -227,6 +228,12 @@ namespace Ryujinx.Ava } } + // When you first load the program, copy to remember the path for the global configuration + if (GlobalConfigurationPath == null) + { + GlobalConfigurationPath = ConfigurationPath; + } + UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration; // Check if graphics backend was overridden diff --git a/src/Ryujinx/Systems/AppHost.cs b/src/Ryujinx/Systems/AppHost.cs index 7b07000b4..f57c589d5 100644 --- a/src/Ryujinx/Systems/AppHost.cs +++ b/src/Ryujinx/Systems/AppHost.cs @@ -461,7 +461,15 @@ namespace Ryujinx.Ava.Systems DisplaySleep.Prevent(); - NpadManager.Initialize(Device, ConfigurationState.Instance.Hid.InputConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse); + if (ConfigurationState.Instance.System.UseInputGlobalConfig.Value && Program.UseExtraConfig) + { + NpadManager.Initialize(Device, ConfigurationState.InstanceExtra.Hid.InputConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse); + } + else + { + NpadManager.Initialize(Device, ConfigurationState.Instance.Hid.InputConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse); + } + TouchScreenManager.Initialize(Device); _viewModel.IsGameRunning = true; diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs index c5bbe3da8..42f8d5bbf 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs @@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Systems.Configuration /// /// The current version of the file format /// - public const int CurrentVersion = 69; + public const int CurrentVersion = 70; /// /// Version of the configuration file format @@ -152,6 +152,11 @@ namespace Ryujinx.Ava.Systems.Configuration /// public bool MatchSystemTime { get; set; } + /// + /// Enable or disable use global input config (Independent from controllers binding) + /// + public bool UseInputGlobalConfig { get; set; } + /// /// Enables or disables Docked Mode /// diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs index f7bc22913..03479d46f 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs @@ -90,6 +90,7 @@ namespace Ryujinx.Ava.Systems.Configuration System.TimeZone.Value = cff.SystemTimeZone; System.SystemTimeOffset.Value = shouldLoadFromFile ? cff.SystemTimeOffset : System.SystemTimeOffset.Value; // Get from global config only System.MatchSystemTime.Value = shouldLoadFromFile ? cff.MatchSystemTime : System.MatchSystemTime.Value; // Get from global config only + System.UseInputGlobalConfig.Value = cff.UseInputGlobalConfig; System.EnableDockedMode.Value = cff.DockedMode; System.EnablePtc.Value = cff.EnablePtc; System.EnableLowPowerPtc.Value = cff.EnableLowPowerPtc; @@ -147,7 +148,7 @@ namespace Ryujinx.Ava.Systems.Configuration Hid.EnableMouse.Value = cff.EnableMouse; Hid.DisableInputWhenOutOfFocus.Value = shouldLoadFromFile ? cff.DisableInputWhenOutOfFocus: Hid.DisableInputWhenOutOfFocus.Value; // Get from global config only Hid.Hotkeys.Value = shouldLoadFromFile ? cff.Hotkeys : Hid.Hotkeys.Value; // Get from global config only - Hid.InputConfig.Value = cff.InputConfig ?? []; + Hid.InputConfig.Value = cff.InputConfig ?? [] ; Hid.RainbowSpeed.Value = cff.RainbowSpeed; Multiplayer.LanInterfaceId.Value = cff.MultiplayerLanInterfaceId; diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs index 3c5fac1cb..350987152 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs @@ -326,6 +326,12 @@ namespace Ryujinx.Ava.Systems.Configuration /// public ReactiveObject MatchSystemTime { get; private set; } + + /// + /// Enable or disable use global input config (Independent from controllers binding) + /// + public ReactiveObject UseInputGlobalConfig { get; private set; } + /// /// Enables or disables Docked Mode /// @@ -417,6 +423,8 @@ namespace Ryujinx.Ava.Systems.Configuration SystemTimeOffset.LogChangesToValue(nameof(SystemTimeOffset)); MatchSystemTime = new ReactiveObject(); MatchSystemTime.LogChangesToValue(nameof(MatchSystemTime)); + UseInputGlobalConfig = new ReactiveObject(); + UseInputGlobalConfig.LogChangesToValue(nameof(UseInputGlobalConfig)); EnableDockedMode = new ReactiveObject(); EnableDockedMode.LogChangesToValue(nameof(EnableDockedMode)); EnablePtc = new ReactiveObject(); @@ -490,7 +498,8 @@ namespace Ryujinx.Ava.Systems.Configuration /// TODO: Implement a ReactiveList class. /// public ReactiveObject> InputConfig { get; private set; } - + public ReactiveObject> UseInputGlobalConfig { get; private set; } + /// /// The speed of spectrum cycling for the Rainbow LED feature. /// @@ -503,6 +512,7 @@ namespace Ryujinx.Ava.Systems.Configuration DisableInputWhenOutOfFocus = new ReactiveObject(); Hotkeys = new ReactiveObject(); InputConfig = new ReactiveObject>(); + UseInputGlobalConfig = new ReactiveObject>(); RainbowSpeed = new ReactiveObject(); RainbowSpeed.Event += (_, args) => Rainbow.Speed = args.NewValue; } @@ -761,6 +771,8 @@ namespace Ryujinx.Ava.Systems.Configuration /// public static ConfigurationState Instance { get; private set; } + public static ConfigurationState InstanceExtra{ get; private set; } + /// /// The UI section /// diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.cs index 39b14244c..7fa79d4e4 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.cs @@ -15,12 +15,13 @@ namespace Ryujinx.Ava.Systems.Configuration { public static void Initialize() { - if (Instance != null) + if (Instance != null || InstanceExtra!= null) { throw new InvalidOperationException("Configuration is already initialized"); } Instance = new ConfigurationState(); + InstanceExtra= new ConfigurationState(); } public ConfigurationFileFormat ToFileFormat() @@ -54,6 +55,7 @@ namespace Ryujinx.Ava.Systems.Configuration SystemTimeZone = System.TimeZone, SystemTimeOffset = System.SystemTimeOffset, MatchSystemTime = System.MatchSystemTime, + UseInputGlobalConfig = System.UseInputGlobalConfig, DockedMode = System.EnableDockedMode, EnableDiscordIntegration = EnableDiscordIntegration, UpdateCheckerType = UpdateCheckerType, @@ -178,6 +180,7 @@ namespace Ryujinx.Ava.Systems.Configuration System.Region.Value = Region.USA; System.TimeZone.Value = "UTC"; System.SystemTimeOffset.Value = 0; + System.UseInputGlobalConfig.Value = false; System.EnableDockedMode.Value = true; EnableDiscordIntegration.Value = true; UpdateCheckerType.Value = UpdaterType.PromptAtStartup; diff --git a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs index 693c99ff1..45fcb9483 100644 --- a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs @@ -82,6 +82,10 @@ namespace Ryujinx.Ava.UI.ViewModels.Input public AvaloniaList ProfilesList { get; set; } public AvaloniaList DeviceList { get; set; } + public bool _useExtraConfig; + + public bool _useGlobalInput; + // XAML Flags public bool ShowSettings => _device > 0; public bool IsController => _device > 1; @@ -255,12 +259,14 @@ namespace Ryujinx.Ava.UI.ViewModels.Input public InputConfig Config { get; set; } - public InputViewModel(UserControl owner) : this() + public InputViewModel(UserControl owner, bool UseGlobalInput = false) : this() { if (Program.PreviewerDetached) { _mainWindow = RyujinxApp.MainWindow; + _useExtraConfig = Program.UseExtraConfig; + AvaloniaKeyboardDriver = new AvaloniaKeyboardDriver(owner); _mainWindow.InputManager.GamepadDriver.OnGamepadConnected += HandleOnGamepadConnected; @@ -268,6 +274,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input _mainWindow.ViewModel.AppHost?.NpadManager.BlockInputUpdates(); + _useGlobalInput = UseGlobalInput; + _isLoaded = false; LoadDevices(); @@ -298,9 +306,18 @@ namespace Ryujinx.Ava.UI.ViewModels.Input PlayerIndexes.Add(new(PlayerIndex.Handheld, LocaleManager.Instance[LocaleKeys.ControllerSettingsHandheld])); } + + private void LoadConfiguration(InputConfig inputConfig = null) { - Config = inputConfig ?? ConfigurationState.Instance.Hid.InputConfig.Value.FirstOrDefault(inputConfig => inputConfig.PlayerIndex == _playerId); + if (_useGlobalInput && _useExtraConfig) + { + Config = inputConfig ?? ConfigurationState.InstanceExtra.Hid.InputConfig.Value.FirstOrDefault(inputConfig => inputConfig.PlayerIndex == _playerId); + } + else + { + Config = inputConfig ?? ConfigurationState.Instance.Hid.InputConfig.Value.FirstOrDefault(inputConfig => inputConfig.PlayerIndex == _playerId); + } if (Config is StandardKeyboardInputConfig keyboardInputConfig) { @@ -834,7 +851,14 @@ namespace Ryujinx.Ava.UI.ViewModels.Input List newConfig = []; - newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value); + if (_useGlobalInput && _useExtraConfig) + { + newConfig.AddRange(ConfigurationState.InstanceExtra.Hid.InputConfig.Value); + } + else + { + newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value); + } newConfig.Remove(newConfig.FirstOrDefault(x => x == null)); @@ -874,13 +898,22 @@ namespace Ryujinx.Ava.UI.ViewModels.Input } } - _mainWindow.ViewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse); - // Atomically replace and signal input change. // NOTE: Do not modify InputConfig.Value directly as other code depends on the on-change event. - ConfigurationState.Instance.Hid.InputConfig.Value = newConfig; + _mainWindow.ViewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse); + + if (_useGlobalInput && _useExtraConfig) + { + // In User Settings when "Use Global Input" is enabled, it saves global input to global setting + ConfigurationState.InstanceExtra.Hid.InputConfig.Value = newConfig; + ConfigurationState.InstanceExtra.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath); + } + else + { + ConfigurationState.Instance.Hid.InputConfig.Value = newConfig; + ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); + } - ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); } public void NotifyChange(string property) diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index b0cd6a556..0b6f08451 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -1563,8 +1563,15 @@ namespace Ryujinx.Ava.UI.ViewModels string idGame = application.IdBaseString; if (ConfigurationFileFormat.TryLoad(Program.GetDirGameUserConfig(idGame), out ConfigurationFileFormat configurationFileFormat)) { - // Loads the user configuration, having previously changed the global configuration to the user configuration + // Loads the user configuration, having previously changed the global configuration to the user configuration ConfigurationState.Instance.Load(configurationFileFormat, Program.GetDirGameUserConfig(idGame, true, true), idGame); + + if (ConfigurationFileFormat.TryLoad(Program.GlobalConfigurationPath, out ConfigurationFileFormat configurationFileFormatExtra)) + { + //This is where the global configuration will be stored. + //This allows you to change the global configuration settings during the game (for example, the global input setting) + ConfigurationState.InstanceExtra.Load(configurationFileFormatExtra, Program.GlobalConfigurationPath); + } } // Code where conditions will be executed after loading user configuration diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 9b540088b..36915f4f1 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -53,6 +53,7 @@ namespace Ryujinx.Ava.UI.ViewModels [ObservableProperty] private bool _isVulkanAvailable = true; [ObservableProperty] private bool _gameListNeedsRefresh; private readonly List _gpuIds = []; + public bool _useInputGlobalConfig; private int _graphicsBackendIndex; private int _scalingFilter; private int _scalingFilterLevel; @@ -64,6 +65,7 @@ namespace Ryujinx.Ava.UI.ViewModels public event Action CloseWindow; public event Action SaveSettingsEvent; + public event Action LocalGlobalInputSwitchEvent; private int _networkInterfaceIndex; private int _multiplayerModeIndex; private string _ldnPassphrase; @@ -84,6 +86,7 @@ namespace Ryujinx.Ava.UI.ViewModels public bool IsGameTitleNotNull => !string.IsNullOrEmpty(GameTitle); public double PanelOpacity => IsGameTitleNotNull ? 0.5 : 1; + public int ResolutionScale { get => _resolutionScale; @@ -141,13 +144,26 @@ namespace Ryujinx.Ava.UI.ViewModels public bool EnableDockedMode { get; set; } public bool EnableKeyboard { get; set; } public bool EnableMouse { get; set; } - public bool DisableInputWhenOutOfFocus { get; set; } - + public bool DisableInputWhenOutOfFocus { get; set; } public int FocusLostActionType { get; set; } - + + public bool EnableConfigGlobal + { + get => _useInputGlobalConfig; + set + { + _useInputGlobalConfig = value; + LocalGlobalInputSwitchEvent?.Invoke(_useInputGlobalConfig); + OnPropertyChanged(nameof(PanelOpacityInput)); + OnPropertyChanged(); + } + } + + public double PanelOpacityInput => EnableConfigGlobal ? 0.5 : 1; + public VSyncMode VSyncMode { - get => _vSyncMode; + get => _vSyncMode; set { if (value is VSyncMode.Custom or VSyncMode.Switch or VSyncMode.Unbounded) @@ -411,7 +427,16 @@ namespace Ryujinx.Ava.UI.ViewModels if (enableToLoadCustomConfig) // During the game. If there is no user config, then load the global config window { - string gameDir = Program.GetDirGameUserConfig(gameId, false, true); + string gameDir = Program.GetDirGameUserConfig(gameId, true, true); + + Program.SetUseExtraConfig(true); + + if (ConfigurationFileFormat.TryLoad(Program.GlobalConfigurationPath, out ConfigurationFileFormat configurationFileFormatExtra)) + { + // Extra load global configuration for input setting and save global input setting with other global config + ConfigurationState.InstanceExtra.Load(configurationFileFormatExtra, Program.GlobalConfigurationPath); + } + if (ConfigurationFileFormat.TryLoad(gameDir, out ConfigurationFileFormat configurationFileFormat)) { ConfigurationState.Instance.Load(configurationFileFormat, gameDir, gameId); @@ -551,9 +576,9 @@ namespace Ryujinx.Ava.UI.ViewModels } } - public void LoadCurrentConfiguration() + public void LoadCurrentConfiguration(bool global = false) { - ConfigurationState config = ConfigurationState.Instance; + ConfigurationState config = global ? ConfigurationState.InstanceExtra: ConfigurationState.Instance; // User Interface EnableDiscordIntegration = config.EnableDiscordIntegration; @@ -579,6 +604,7 @@ namespace Ryujinx.Ava.UI.ViewModels }; // Input + EnableConfigGlobal = config.System.UseInputGlobalConfig; EnableDockedMode = config.System.EnableDockedMode; EnableKeyboard = config.Hid.EnableKeyboard; EnableMouse = config.Hid.EnableMouse; @@ -661,9 +687,9 @@ namespace Ryujinx.Ava.UI.ViewModels LdnServer = config.Multiplayer.LdnServer; } - public void SaveSettings() + public void SaveSettings(bool global = false) { - ConfigurationState config = ConfigurationState.Instance; + ConfigurationState config = global ? ConfigurationState.InstanceExtra: ConfigurationState.Instance; // User Interface config.EnableDiscordIntegration.Value = EnableDiscordIntegration; @@ -685,6 +711,7 @@ namespace Ryujinx.Ava.UI.ViewModels }; // Input + config.System.UseInputGlobalConfig.Value = EnableConfigGlobal; config.System.EnableDockedMode.Value = EnableDockedMode; config.Hid.EnableKeyboard.Value = EnableKeyboard; config.Hid.EnableMouse.Value = EnableMouse; @@ -797,11 +824,14 @@ namespace Ryujinx.Ava.UI.ViewModels private static void RevertIfNotSaved() { - // maybe this is an unnecessary check(all options need to be tested) + /* + maybe this is an unnecessary check(all options need to be tested) if (string.IsNullOrEmpty(Program.GlobalConfigurationPath)) { Program.ReloadConfig(); } + */ + Program.ReloadConfig(); } public void ApplyButton() diff --git a/src/Ryujinx/UI/Views/Input/InputView.axaml.cs b/src/Ryujinx/UI/Views/Input/InputView.axaml.cs index aa9e25fbf..315370c93 100644 --- a/src/Ryujinx/UI/Views/Input/InputView.axaml.cs +++ b/src/Ryujinx/UI/Views/Input/InputView.axaml.cs @@ -1,5 +1,6 @@ using Avalonia.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; @@ -13,7 +14,7 @@ namespace Ryujinx.Ava.UI.Views.Input public InputView() { - ViewModel = new InputViewModel(this); + ViewModel = new InputViewModel(this, ConfigurationState.Instance.System.UseInputGlobalConfig.Value); InitializeComponent(); } @@ -23,6 +24,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) diff --git a/src/Ryujinx/UI/Views/Settings/SettingsInputView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsInputView.axaml index 0a77c8863..992dd34a6 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsInputView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsInputView.axaml @@ -1,4 +1,4 @@ - - + + + + @@ -34,6 +41,13 @@ + + + - - -