remove this thing
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:
dankmeme01 2024-09-16 12:45:50 +02:00
parent c6dcf11ad0
commit 264cb28d88

View file

@ -94,14 +94,6 @@ bool redirectStd(FILE* which, std::string const& name, const Severity sev) {
return true;
}
static bool isWine() {
if (auto mod = GetModuleHandle("ntdll.dll")) {
return GetProcAddress(mod, "wine_get_version") != nullptr;
}
return false;
}
void console::setup() {
// if the game launched from a console or with a console already attached,
// this is where we find that out and save its handle
@ -126,7 +118,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
// 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")) && !isWine()) {
if ((count == 0 || path.ends_with("\\dev\\null"))) {
s_outHandle = nullptr;
CloseHandle(GetStdHandle(STD_OUTPUT_HANDLE));
CloseHandle(GetStdHandle(STD_INPUT_HANDLE));