diff --git a/loader/src/platform/windows/console.cpp b/loader/src/platform/windows/console.cpp index e19d6bff1..59b76e3ac 100644 --- a/loader/src/platform/windows/console.cpp +++ b/loader/src/platform/windows/console.cpp @@ -115,19 +115,19 @@ void console::setup() { path = std::string(buf, count - 1); } - // count == 0 => not a console and not a file, assume it's closed - // wine does something weird with /dev/null? not sure tbh but it's definitely up to no good - // TODO: the isWine check is pretty hacky but without it the game does not launch at all and i cba to figure it out rn - if ((count == 0 || path.ends_with("\\dev\\null"))) { - s_outHandle = nullptr; - CloseHandle(GetStdHandle(STD_OUTPUT_HANDLE)); - CloseHandle(GetStdHandle(STD_INPUT_HANDLE)); - CloseHandle(GetStdHandle(STD_ERROR_HANDLE)); - FreeConsole(); - SetStdHandle(STD_OUTPUT_HANDLE, nullptr); - SetStdHandle(STD_INPUT_HANDLE, nullptr); - SetStdHandle(STD_ERROR_HANDLE, nullptr); - } + // TODO: this code causes a crash when piping game's output somewhere (and in some other cases), so it's removed for now + // // count == 0 => not a console and not a file, assume it's closed + // // wine does something weird with /dev/null? not sure tbh but it's definitely up to no good + // if ((count == 0 || path.ends_with("\\dev\\null"))) { + // s_outHandle = nullptr; + // CloseHandle(GetStdHandle(STD_OUTPUT_HANDLE)); + // CloseHandle(GetStdHandle(STD_INPUT_HANDLE)); + // CloseHandle(GetStdHandle(STD_ERROR_HANDLE)); + // FreeConsole(); + // SetStdHandle(STD_OUTPUT_HANDLE, nullptr); + // SetStdHandle(STD_INPUT_HANDLE, nullptr); + // SetStdHandle(STD_ERROR_HANDLE, nullptr); + // } } // clion console supports escape codes but we can't query that because it's a named pipe