From ede761cc99a6874e6f2543efe57a3c91057e3d5f Mon Sep 17 00:00:00 2001 From: kekkon Date: Thu, 15 Jun 2023 11:02:59 +0200 Subject: [PATCH] Fix review comments --- .../UI/ViewModels/MainWindowViewModel.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs index 6ae6d15bb..b85767a5a 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/MainWindowViewModel.cs @@ -1480,12 +1480,12 @@ namespace Ryujinx.Ava.UI.ViewModels async void Action() { - var loadSuccessful = false; + bool isApplicationLoaded = false; try { - loadSuccessful = await AppHost.LoadGuestApplication(); + isApplicationLoaded = await AppHost.LoadGuestApplication(); } - catch (HorizonResultException hex) + catch (HorizonResultException ex) { // Apphost Cleanup AppHost = null; @@ -1493,14 +1493,13 @@ namespace Ryujinx.Ava.UI.ViewModels await Dispatcher.UIThread.InvokeAsync(async () => { - await ContentDialogHelper.CreateErrorDialog( - string.Format(LocaleManager.Instance[LocaleKeys.DialogCorruptedGameError], hex.Message)); + await ContentDialogHelper.CreateErrorDialog(string.Format(LocaleManager.Instance[LocaleKeys.DialogCorruptedGameError], ex.Message)); }); return; } - if (!loadSuccessful) + if (!isApplicationLoaded) { AppHost.DisposeContext(); AppHost = null; @@ -1610,7 +1609,10 @@ namespace Ryujinx.Ava.UI.ViewModels SelectedIcon = null; - Dispatcher.UIThread.InvokeAsync(() => { Title = $"Ryujinx {Program.Version}"; }); + Dispatcher.UIThread.InvokeAsync(() => + { + Title = $"Ryujinx {Program.Version}"; + }); } public void ToggleFullscreen()