Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
Fix output logging bug that broke games that run in a Windows console
NotProtonNotdae593ca5b35
diff --git a/steam-shim/steam.cpp b/steam-shim/steam.cppindex 1feaf53..ab5c870 100644--- a/steam-shim/steam.cpp+++ b/steam-shim/steam.cpp@@ -1475,12 +1475,10 @@ run:si.wShowWindow = SW_HIDE;}- si.dwFlags |= STARTF_USESTDHANDLES;- si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);- si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);- si.hStdError = GetStdHandle(STD_ERROR_HANDLE);+ /* STARTF_USESTDHANDLES would pin console games to the log, and console calls like Console.Clear() would fail. */+ BOOL inherit = !(flags & CREATE_NEW_CONSOLE);- if (!CreateProcessW(NULL, cmdline, NULL, NULL, TRUE, flags, NULL, NULL, &si, &pi))+ if (!CreateProcessW(NULL, cmdline, NULL, NULL, inherit, flags, NULL, NULL, &si, &pi)){WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError());return INVALID_HANDLE_VALUE;