Skip to content

Commit

Permalink
UI: Reload games list on locale change.
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Oct 19, 2024
1 parent 6ca57dd commit c0cc3c4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
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;
Expand All @@ -27,6 +29,11 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
Window = window;
DataContext = window.ViewModel;
LocaleManager.Instance.LocaleChanged += () => Dispatcher.UIThread.Post(() =>
{
if (Window.ViewModel.EnableNonGameRunningControls)
Refresh_OnClick(null, null);
});
}
}

Expand All @@ -48,10 +55,7 @@ private void AspectRatioStatus_OnClick(object sender, RoutedEventArgs e)
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)
{
Expand Down

0 comments on commit c0cc3c4

Please sign in to comment.