mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
fix linux console crash, comment code out until someone figures out a more proper fix
Some checks failed
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions
Check CHANGELOG.md / Check CHANGELOG.md (push) Has been cancelled
Some checks failed
Build Binaries / Build Windows (push) Waiting to run
Build Binaries / Build macOS (push) Waiting to run
Build Binaries / Build Android (64-bit) (push) Waiting to run
Build Binaries / Build Android (32-bit) (push) Waiting to run
Build Binaries / Publish (push) Blocked by required conditions
Check CHANGELOG.md / Check CHANGELOG.md (push) Has been cancelled
This commit is contained in:
parent
47e0ca52b6
commit
8ecb1c549a
1 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue