From 82f81f89a677ed2b742ffcd1fb663c80305493f6 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 16 Jul 2021 17:17:19 +0200 Subject: [PATCH] (Windows) Fixed an issue where the console window was displayed when launching scripts. --- es-core/src/Platform.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-core/src/Platform.cpp b/es-core/src/Platform.cpp index 5d2a9ed81..e301fd4be 100644 --- a/es-core/src/Platform.cpp +++ b/es-core/src/Platform.cpp @@ -143,6 +143,10 @@ int launchGameWindows(const std::wstring& cmd_utf16, bool runInBackground) PROCESS_INFORMATION pi; si.cb = sizeof(si); + // The console window is hidden by default when compiled with MSVC, but when + // using MinGW it has to be set explicitly. + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_HIDE; bool processReturnValue = true; DWORD errorCode = 0;