0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 12:15:47 +00:00

UI: Reload games list on locale change.

This commit is contained in:
Evan Husted 2024-10-19 16:31:15 -05:00
parent 6ca57dd016
commit c0cc3c4188

View file

@ -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)
{