From 5c0fb0cec30028a155a48ed0b9569abc6ec4c13b Mon Sep 17 00:00:00 2001 From: Ethan Page <88117372+ethanriverpage@users.noreply.github.com> Date: Sun, 4 Dec 2022 14:17:11 -0500 Subject: [PATCH] ui: Disallow checking for updates while emulation active (#3886) * Disallow updating while game is running * Reflected change on Avalonia * Git has gone wonky * Fix accidental indent --- Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs | 2 ++ Ryujinx/Ui/MainWindow.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs index c0a94154c2..a9da8d7d0e 100644 --- a/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/MainWindow.axaml.cs @@ -266,6 +266,7 @@ namespace Ryujinx.Ava.Ui.Windows return; } + CanUpdate = false; ViewModel.LoadHeading = string.IsNullOrWhiteSpace(titleName) ? string.Format(LocaleManager.Instance["LoadingHeading"], AppHost.Device.Application.TitleName) : titleName; ViewModel.TitleName = string.IsNullOrWhiteSpace(titleName) ? AppHost.Device.Application.TitleName : titleName; @@ -371,6 +372,7 @@ namespace Ryujinx.Ava.Ui.Windows ViewModel.ShowContent = true; ViewModel.ShowLoadProgress = false; ViewModel.IsLoadingIndeterminate = false; + CanUpdate = true; Cursor = Cursor.Default; if (MainContent.Content != _mainViewContent) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 9f9016b9f9..5216c77470 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -862,6 +862,7 @@ namespace Ryujinx.Ui _gameLoaded = true; _actionMenu.Sensitive = true; + UpdateMenuItem.Sensitive = false; _lastScannedAmiiboId = ""; @@ -1333,6 +1334,7 @@ namespace Ryujinx.Ui _pauseEmulation.Sensitive = false; _resumeEmulation.Sensitive = false; + UpdateMenuItem.Sensitive = true; RendererWidget?.Exit(); }