Prefer generic overload when type is known (#430)

This commit is contained in:
Marco Carvalho 2024-12-22 16:23:35 -03:00 committed by GitHub
parent 8259f790d7
commit b5483d8fe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 14 deletions

View file

@ -52,7 +52,7 @@ namespace Ryujinx.Ava.UI.Views.Main
private void AspectRatioStatus_OnClick(object sender, RoutedEventArgs e)
{
AspectRatio aspectRatio = ConfigurationState.Instance.Graphics.AspectRatio.Value;
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<AspectRatio>().Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1;
}
private void Refresh_OnClick(object sender, RoutedEventArgs e) => Window.LoadApplications();