Fix Wine crashing when launching via terminal (#501)

This commit is contained in:
Fire 2024-02-26 12:37:27 +00:00 committed by GitHub
parent 6ee63091de
commit c94e350cdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,7 +117,7 @@ void console::setup() {
// 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")) {
if ((count == 0 || path.ends_with("\\dev\\null")) && Mod::get()->getSettingValue<bool>("show-platform-console")) {
s_outHandle = nullptr;
CloseHandle(GetStdHandle(STD_OUTPUT_HANDLE));
CloseHandle(GetStdHandle(STD_INPUT_HANDLE));