From c0cc3c4188e6b5416373e41632ab19855f71b167 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 19 Oct 2024 16:31:15 -0500 Subject: [PATCH] UI: Reload games list on locale change. --- src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs index 98024b49a..372bcf20b 100644 --- a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs +++ b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs @@ -2,6 +2,8 @@ using Avalonia; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; +using Avalonia.Threading; +using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.UI.Windows; using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; @@ -27,6 +29,11 @@ namespace Ryujinx.Ava.UI.Views.Main { Window = window; DataContext = window.ViewModel; + LocaleManager.Instance.LocaleChanged += () => Dispatcher.UIThread.Post(() => + { + if (Window.ViewModel.EnableNonGameRunningControls) + Refresh_OnClick(null, null); + }); } } @@ -48,10 +55,7 @@ namespace Ryujinx.Ava.UI.Views.Main ConfigurationState.Instance.Graphics.AspectRatio.Value = (int)aspectRatio + 1 > Enum.GetNames(typeof(AspectRatio)).Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1; } - private void Refresh_OnClick(object sender, RoutedEventArgs e) - { - Window.LoadApplications(); - } + private void Refresh_OnClick(object sender, RoutedEventArgs e) => Window.LoadApplications(); private void VolumeStatus_OnPointerWheelChanged(object sender, PointerWheelEventArgs e) {