Skip to content

Commit

Permalink
- keep ENABLE_VIRTUAL_TERMINAL_PROCESSING mode in isolated console mode
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Oct 16, 2024
1 parent e242330 commit 3af3b2e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/platform/win32/i_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,13 @@ int DoMain (HINSTANCE hInstance)
if (isConsoleApp())
{
StdOut = GetStdHandle(STD_OUTPUT_HANDLE);
FancyStdOut = IsWindows10OrGreater(); // Windows 8.1 and lower do not understand ANSI formatting.

SetConsoleCP(CP_UTF8);
SetConsoleOutputCP(CP_UTF8);
DWORD mode;

if (SetConsoleMode(StdOut, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING))

Check warning on line 202 in src/common/platform/win32/i_main.cpp

View workflow job for this annotation

GitHub Actions / Visual Studio 2019 | Release

uninitialized local variable 'mode' used [D:\a\gzdoom\gzdoom\build\src\zdoom.vcxproj]
FancyStdOut = IsWindows10OrGreater(); // Windows 8.1 and lower do not understand ANSI formatting.
}
else if (Args->CheckParm("-stdout") || Args->CheckParm("-norun"))
{
Expand Down

0 comments on commit 3af3b2e

Please sign in to comment.