mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-24 02:00:11 +01:00
UI: Reload games list on locale change.
This commit is contained in:
parent
6ca57dd016
commit
c0cc3c4188
@ -2,6 +2,8 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
@ -27,6 +29,11 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
{
|
{
|
||||||
Window = window;
|
Window = window;
|
||||||
DataContext = window.ViewModel;
|
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;
|
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)
|
private void Refresh_OnClick(object sender, RoutedEventArgs e) => Window.LoadApplications();
|
||||||
{
|
|
||||||
Window.LoadApplications();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void VolumeStatus_OnPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
private void VolumeStatus_OnPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user