Skip to content

Commit

Permalink
Fix program flow bug w/ launch settings
Browse files Browse the repository at this point in the history
this is a nasty bandaid fix that ideally will be removed when we actually work on it
  • Loading branch information
pizzaboxer committed Jun 14, 2024
1 parent 5cf49b4 commit 989ba00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
13 changes: 11 additions & 2 deletions Bloxstrap/LaunchSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class LaunchSettings
public string[] Args { get; private set; }

private Dictionary<string, PropertyInfo>? _flagMap;

private string? _robloxArg;

// pizzaboxer wanted this
private void ParseLaunchFlagProps()
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
}

Expand Down

1 comment on commit 989ba00

@EasternBloxxer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke studio support

Please sign in to comment.