Bladeren bron

misc: chore: Prevent firmware installation prompt from showing up multiple times during runtime when using --install-firmware

Evan Husted 1 jaar geleden
bovenliggende
commit
d0ac83b493
2 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 3 0
      src/Ryujinx/UI/Windows/MainWindow.axaml.cs
  2. 1 1
      src/Ryujinx/Utilities/CommandLineState.cs

+ 3 - 0
src/Ryujinx/UI/Windows/MainWindow.axaml.cs

@@ -148,8 +148,11 @@ namespace Ryujinx.Ava.UI.Windows
                 {
                     if ((firmwarePath.ExistsAsFile && firmwarePath.Extension is "xci" or "zip") ||
                         firmwarePath.ExistsAsDirectory)
+                    {
                         await Dispatcher.UIThread.InvokeAsync(() => 
                             ViewModel.HandleFirmwareInstallation(firmwarePath));
+                        CommandLineState.FirmwareToInstallPathArg = null;
+                    }
                     else
                         Logger.Notice.Print(LogClass.UI, "Invalid firmware type provided. Path must be a directory, or a .zip or .xci file.");
                 }

+ 1 - 1
src/Ryujinx/Utilities/CommandLineState.cs

@@ -14,7 +14,7 @@ namespace Ryujinx.Ava.Utilities
         public static string OverrideBackendThreading { get; private set; }
         public static string OverrideHideCursor { get; private set; }
         public static string BaseDirPathArg { get; private set; }
-        public static FilePath FirmwareToInstallPathArg { get; private set; }
+        public static FilePath FirmwareToInstallPathArg { get; set; }
         public static string Profile { get; private set; }
         public static string LaunchPathArg { get; private set; }
         public static string LaunchApplicationId { get; private set; }