mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
do not set console mode from an uninitialized variable.
This commit is contained in:
parent
3af3b2e742
commit
bf84d8152b
1 changed files with 6 additions and 2 deletions
|
@ -197,10 +197,14 @@ int DoMain (HINSTANCE hInstance)
|
|||
|
||||
SetConsoleCP(CP_UTF8);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
|
||||
DWORD mode;
|
||||
|
||||
if (SetConsoleMode(StdOut, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING))
|
||||
FancyStdOut = IsWindows10OrGreater(); // Windows 8.1 and lower do not understand ANSI formatting.
|
||||
if (GetConsoleMode(StdOut, &mode))
|
||||
{
|
||||
if (SetConsoleMode(StdOut, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING))
|
||||
FancyStdOut = IsWindows10OrGreater(); // Windows 8.1 and lower do not understand ANSI formatting.
|
||||
}
|
||||
}
|
||||
else if (Args->CheckParm("-stdout") || Args->CheckParm("-norun"))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue