Преглед на файлове

Created bool to store if the "Avilable Update" should be hidden on startup (--hide-updates) (#272)

fixes #263
Nicola преди 1 година
родител
ревизия
df5002bdbf
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 4 0
      src/Ryujinx.UI.Common/Helper/CommandLineState.cs
  2. 1 1
      src/Ryujinx/UI/Windows/MainWindow.axaml.cs

+ 4 - 0
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;

+ 1 - 1
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(