diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index 890bd28b..398528ad 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -144,6 +144,8 @@ protected override async void OnStartup(StartupEventArgs e) FastFlags.Load(); } + LaunchSettings.ParseRoblox(); + HttpClient.Timeout = TimeSpan.FromSeconds(30); HttpClient.DefaultRequestHeaders.Add("User-Agent", ProjectRepository); diff --git a/Bloxstrap/LaunchSettings.cs b/Bloxstrap/LaunchSettings.cs index 92b68bb1..07e3eee4 100644 --- a/Bloxstrap/LaunchSettings.cs +++ b/Bloxstrap/LaunchSettings.cs @@ -37,6 +37,8 @@ public class LaunchSettings public string[] Args { get; private set; } private Dictionary? _flagMap; + + private string? _robloxArg; // pizzaboxer wanted this private void ParseLaunchFlagProps() @@ -76,8 +78,14 @@ private void ParseFlag(string arg) } } - private void ParseRoblox(string arg, ref int i) + // private void ParseRoblox(string arg, ref int i) + public void ParseRoblox() { + string? arg = _robloxArg; + + if (arg is null) + return; + if (arg.StartsWith("roblox-player:")) { RobloxLaunchArgs = ProtocolHandler.ParseUri(arg); @@ -147,7 +155,8 @@ private void Parse() // check & handle roblox arg if (!firstArg.StartsWith('-') || firstArg == "-ide") { - ParseRoblox(firstArg, ref idx); + // ParseRoblox(firstArg, ref idx); + _robloxArg = firstArg; idx++; // roblox arg }