Skip to content

Commit

Permalink
Re-enable UseShellExecute to fix game freezing during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
maddie480 committed Dec 22, 2024
1 parent 1de1c53 commit eb33efa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ and only contains the latest changes.
Its purpose is to be shown in Olympus when updating.

#changelog#
∙ Fixed checksum computing (which led to false flags for mod updates, and checksum failures)
∙ Fixed game freezing during startup when ran through Olympus on Windows
3 changes: 1 addition & 2 deletions sharp/CmdLaunch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public override string Run(string root, string args, bool force) {
Environment.SetEnvironmentVariable("LOCAL_LUA_DEBUGGER_VSCODE", "0");

Process game = new Process();
game.StartInfo.UseShellExecute = true;

// Unix-likes use a MonoKickstart wrapper script / launch binary.
if (Environment.OSVersion.Platform == PlatformID.Unix ||
Expand Down Expand Up @@ -52,7 +53,6 @@ public override string Run(string root, string args, bool force) {
if (Environment.OSVersion.Platform == PlatformID.Unix && game.StartInfo.FileName.Contains("com.valvesoftware.Steam")) {
game.StartInfo.FileName = "xdg-open";
args = "steam://run/504230";
game.StartInfo.UseShellExecute = true;
// args won't work but launch vanilla will work because it uses nextLaunchIsVanilla.txt
}

Expand All @@ -69,7 +69,6 @@ public override string Run(string root, string args, bool force) {
else
game.StartInfo.Arguments = game.StartInfo.FileName;
game.StartInfo.FileName = Path.Combine(Program.RootDirectory, "flatpak-wrapper");
game.StartInfo.UseShellExecute = true;
}

Console.Error.WriteLine($"Starting Celeste process: {game.StartInfo.FileName} {(string.IsNullOrEmpty(args) ? "(without args)" : args)}");
Expand Down

0 comments on commit eb33efa

Please sign in to comment.