From fd1da398ac33b4007265190e9cd1369b024e0de7 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 16 Aug 2023 23:02:38 +0200 Subject: [PATCH] The %STARTDIR% variable could not be combined with running ES-DE in the background while launching games on Linux and macOS --- es-core/src/utils/PlatformUtil.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/es-core/src/utils/PlatformUtil.cpp b/es-core/src/utils/PlatformUtil.cpp index 4af714ceb..aa2f964d0 100644 --- a/es-core/src/utils/PlatformUtil.cpp +++ b/es-core/src/utils/PlatformUtil.cpp @@ -86,6 +86,8 @@ namespace Utils // instance no output from the command is captured and no real error handling is // implemented. It should therefore only be used when absolutely necessary. if (runInBackground) { + if (startDirectory != "") + command = "cd " + startDirectory + " && " + command; LOG(LogDebug) << "Platform::launchGameUnix(): Launching game while keeping ES-DE running " "in the background, no command output will be written to the log file";