Merge pull request #3694 from jroweboy/quickfix

Fix duplicated logs on windows
This commit is contained in:
Weiyi Wang 2018-04-28 10:31:25 +03:00 committed by GitHub
commit 9c65a45358
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -34,6 +34,12 @@ void ToggleConsole() {
freopen_s(&temp, "NUL", "w", stderr);
}
}
#else
if (UISettings::values.show_console) {
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
} else {
Log::RemoveBackend(Log::ColorConsoleBackend::Name());
}
#endif
}
} // namespace Debugger

View File

@ -1338,8 +1338,6 @@ void GMainWindow::SyncMenuUISettings() {
#endif
int main(int argc, char* argv[]) {
Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>());
MicroProfileOnThreadCreate("Frontend");
SCOPE_EXIT({ MicroProfileShutdown(); });