mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-12 02:50:09 +01:00
Fix newlines not honored in Windows console
This is relevant when building with `windows_subsystem=console`. (cherry picked from commit e14c5186e25020a3759f7e444eba00fb3aa82bb3)
This commit is contained in:
parent
6812b69c1e
commit
53a2098620
@ -3920,11 +3920,8 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) {
|
||||
//
|
||||
// NOTE: The engine does not use ANSI escape codes to color error/warning messages; it uses Windows API calls instead.
|
||||
// Therefore, error/warning messages are still colored on Windows versions older than 10.
|
||||
HANDLE stdoutHandle;
|
||||
stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD outMode = 0;
|
||||
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
|
||||
HANDLE stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD outMode = ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
if (!SetConsoleMode(stdoutHandle, outMode)) {
|
||||
// Windows 8.1 or below, or Windows 10 prior to Anniversary Update.
|
||||
print_verbose("Can't set the ENABLE_VIRTUAL_TERMINAL_PROCESSING Windows console mode.");
|
||||
|
Loading…
Reference in New Issue
Block a user