diff options
| author | Stefan Boberg <[email protected]> | 2023-05-16 13:33:16 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-16 13:33:16 +0200 |
| commit | 93b7eac6570f38e1d0d25da893e184ecbbe05fdf (patch) | |
| tree | 87c05d944b32871d6a0a326ccf59373c5afe3d18 /src/zen/zen.cpp | |
| parent | Add `--gc-projectstore-duration-seconds` option (#281) (diff) | |
| download | archived-zen-93b7eac6570f38e1d0d25da893e184ecbbe05fdf.tar.xz archived-zen-93b7eac6570f38e1d0d25da893e184ecbbe05fdf.zip | |
Moved EnableVTMode function into zencore (#311)
Diffstat (limited to 'src/zen/zen.cpp')
| -rw-r--r-- | src/zen/zen.cpp | 17 |
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(); }); |