From 5f5c76107c969709d39396d2bf4a77cd60276ffc Mon Sep 17 00:00:00 2001 From: Vova Date: Sat, 8 Feb 2025 18:29:31 +1000 Subject: [PATCH] Fixed a ban where a custom setting was mistakenly created when starting the game if it did not exist. Now when starting the game, if a custom setting was created, the current game will be displayed in the settings window. Code cleanup. --- src/Ryujinx/AppHost.cs | 6 ++-- src/Ryujinx/Assets/Styles/Styles.xaml | 3 +- src/Ryujinx/Program.cs | 8 ++--- .../Controls/ApplicationContextMenu.axaml.cs | 15 --------- .../UI/Controls/ApplicationListView.axaml.cs | 13 -------- .../UI/ViewModels/MainWindowViewModel.cs | 12 +++---- .../UI/ViewModels/SettingsViewModel.cs | 31 +++++++++++-------- .../UI/Views/Main/MainMenuBarView.axaml.cs | 22 +++++++++++-- .../UI/Windows/UserConfigWindows.axaml.cs | 5 +-- 9 files changed, 55 insertions(+), 60 deletions(-) diff --git a/src/Ryujinx/AppHost.cs b/src/Ryujinx/AppHost.cs index d49456b9a..98c0771e1 100644 --- a/src/Ryujinx/AppHost.cs +++ b/src/Ryujinx/AppHost.cs @@ -469,6 +469,8 @@ namespace Ryujinx.Ava _viewModel.IsGameRunning = true; + + Dispatcher.UIThread.InvokeAsync(() => { _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar); @@ -582,8 +584,8 @@ namespace Ryujinx.Ava Rainbow.Disable(); Rainbow.Reset(); - //Reload settings when the game is turned off - //(resets custom settings if there were any) + // Reload settings when the game is turned off + // (resets custom settings if there were any) Program.ReloadConfig(); _isStopped = true; diff --git a/src/Ryujinx/Assets/Styles/Styles.xaml b/src/Ryujinx/Assets/Styles/Styles.xaml index c3bc27efd..cf9f28f02 100644 --- a/src/Ryujinx/Assets/Styles/Styles.xaml +++ b/src/Ryujinx/Assets/Styles/Styles.xaml @@ -28,7 +28,7 @@ Height="28" HorizontalAlignment="Right" Content="Addy" /> -