From 495d08205f2e89d8a6e67b3b9202cf16ad1969de Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 12 Oct 2023 22:06:30 +0100 Subject: [PATCH] fix studio shortcut not working --- Bloxstrap/App.xaml.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index c6886c9..557d0c8 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -197,7 +197,7 @@ namespace Bloxstrap #endif string commandLine = ""; - LaunchMode launchMode = LaunchMode.Player; + LaunchMode? launchMode = null; if (IsMenuLaunch) { @@ -225,6 +225,8 @@ namespace Bloxstrap if (LaunchArgs[0].StartsWith("roblox-player:")) { commandLine = ProtocolHandler.ParseUri(LaunchArgs[0]); + + launchMode = LaunchMode.Player; } else if (LaunchArgs[0].StartsWith("roblox:")) { @@ -235,6 +237,8 @@ namespace Bloxstrap ); commandLine = $"--app --deeplink {LaunchArgs[0]}"; + + launchMode = LaunchMode.Player; } else if (LaunchArgs[0].StartsWith("roblox-studio:")) { @@ -248,6 +252,7 @@ namespace Bloxstrap else if (LaunchArgs[0].StartsWith("roblox-studio-auth:")) { commandLine = HttpUtility.UrlDecode(LaunchArgs[0]); + launchMode = LaunchMode.StudioAuth; } else if (LaunchArgs[0] == "-ide") @@ -260,21 +265,25 @@ namespace Bloxstrap else { commandLine = "--app"; + + launchMode = LaunchMode.Player; } } else { commandLine = "--app"; + + launchMode = LaunchMode.Player; } - if (!String.IsNullOrEmpty(commandLine)) + if (launchMode != null) { if (!IsFirstRun) ShouldSaveConfigs = true; // start bootstrapper and show the bootstrapper modal if we're not running silently Logger.WriteLine(LOG_IDENT, "Initializing bootstrapper"); - Bootstrapper bootstrapper = new(commandLine, launchMode); + Bootstrapper bootstrapper = new(commandLine, (LaunchMode)launchMode); IBootstrapperDialog? dialog = null; if (!IsQuiet)