From df5002bdbf5868cb4320282ce1ecee91edd2745b Mon Sep 17 00:00:00 2001 From: Nicola <61830443+nicola02nb@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:52:51 +0100 Subject: [PATCH] Created bool to store if the "Avilable Update" should be hidden on startup (--hide-updates) (#272) fixes #263 --- src/Ryujinx.UI.Common/Helper/CommandLineState.cs | 4 ++++ src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.UI.Common/Helper/CommandLineState.cs b/src/Ryujinx.UI.Common/Helper/CommandLineState.cs index ae0e4d904..3a96a55c8 100644 --- a/src/Ryujinx.UI.Common/Helper/CommandLineState.cs +++ b/src/Ryujinx.UI.Common/Helper/CommandLineState.cs @@ -16,6 +16,7 @@ namespace Ryujinx.UI.Common.Helper public static string LaunchPathArg { get; private set; } public static string LaunchApplicationId { get; private set; } public static bool StartFullscreenArg { get; private set; } + public static bool HideAvailableUpdates { get; private set; } public static void ParseArguments(string[] args) { @@ -93,6 +94,9 @@ namespace Ryujinx.UI.Common.Helper OverrideHideCursor = args[++i]; break; + case "--hide-updates": + HideAvailableUpdates = true; + break; case "--software-gui": OverrideHardwareAcceleration = false; break; diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index 4ddcee07f..829db4bc9 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -383,7 +383,7 @@ namespace Ryujinx.Ava.UI.Windows await Dispatcher.UIThread.InvokeAsync(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys)); } - if (ConfigurationState.Instance.CheckUpdatesOnStart && Updater.CanUpdate()) + if (ConfigurationState.Instance.CheckUpdatesOnStart && !CommandLineState.HideAvailableUpdates && Updater.CanUpdate()) { await this.BeginUpdateAsync() .ContinueWith(