aboutsummaryrefslogtreecommitdiff
path: root/src/zen/zen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zen/zen.cpp')
-rw-r--r--src/zen/zen.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/zen/zen.cpp b/src/zen/zen.cpp
index d32b630fe..3cb5bec47 100644
--- a/src/zen/zen.cpp
+++ b/src/zen/zen.cpp
@@ -143,19 +143,7 @@ public:
ZEN_UNUSED(GlobalOptions);
// Set output mode to handle virtual terminal sequences
-# if ZEN_PLATFORM_WINDOWS
- HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
- if (hOut == INVALID_HANDLE_VALUE)
- return GetLastError();
-
- DWORD dwMode = 0;
- if (!GetConsoleMode(hOut, &dwMode))
- return GetLastError();
-
- dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
- if (!SetConsoleMode(hOut, dwMode))
- return GetLastError();
-# endif // ZEN_PLATFORM_WINDOWS
+ zen::logging::EnableVTMode();
return ZEN_RUN_TESTS(argc, argv);
}
@@ -184,6 +172,9 @@ main(int argc, char** argv)
zen::logging::InitializeLogging();
zen::MaximizeOpenFileCount();
+ // Set output mode to handle virtual terminal sequences
+ zen::logging::EnableVTMode();
+
//////////////////////////////////////////////////////////////////////////
auto _ = zen::MakeGuard([] { spdlog::shutdown(); });