early-access version 1605

This commit is contained in:
pineappleEA
2021-04-15 07:16:22 +02:00
parent bd8df24a11
commit 0de10206e4
12 changed files with 59 additions and 46 deletions
+4 -4
View File
@@ -29,13 +29,13 @@ void ToggleConsole() {
freopen_s(&temp, "CONIN$", "r", stdin);
freopen_s(&temp, "CONOUT$", "w", stdout);
freopen_s(&temp, "CONOUT$", "w", stderr);
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
Common::Log::AddBackend(std::make_unique<Common::Log::ColorConsoleBackend>());
}
} else {
if (FreeConsole()) {
// In order to close the console, we have to also detach the streams on it.
// Just redirect them to NUL if there is no console window
Log::RemoveBackend(Log::ColorConsoleBackend::Name());
Common::Log::RemoveBackend(Common::Log::ColorConsoleBackend::Name());
freopen_s(&temp, "NUL", "r", stdin);
freopen_s(&temp, "NUL", "w", stdout);
freopen_s(&temp, "NUL", "w", stderr);
@@ -43,9 +43,9 @@ void ToggleConsole() {
}
#else
if (UISettings::values.show_console) {
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
Common::Log::AddBackend(std::make_unique<Common::Log::ColorConsoleBackend>());
} else {
Log::RemoveBackend(Log::ColorConsoleBackend::Name());
Common::Log::RemoveBackend(Common::Log::ColorConsoleBackend::Name());
}
#endif
}