From eb33efa1ba5a51f2470cab8b934842ffe6ac5b15 Mon Sep 17 00:00:00 2001 From: Maddie <52103563+maddie480@users.noreply.github.com> Date: Sun, 22 Dec 2024 11:24:21 +0100 Subject: [PATCH] Re-enable UseShellExecute to fix game freezing during startup --- changelog.txt | 2 +- sharp/CmdLaunch.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 085d6a5..5abcbbb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) \ No newline at end of file +∙ Fixed game freezing during startup when ran through Olympus on Windows \ No newline at end of file diff --git a/sharp/CmdLaunch.cs b/sharp/CmdLaunch.cs index eed6640..e5a5513 100644 --- a/sharp/CmdLaunch.cs +++ b/sharp/CmdLaunch.cs @@ -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 || @@ -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 } @@ -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)}");