We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fed2ab commit b37e095Copy full SHA for b37e095
main.cpp
@@ -944,7 +944,7 @@ int main(int argc, char ** argv) {
944
// Enable ANSI colors on Windows 10+
945
unsigned long dwMode = 0;
946
void* hConOut = GetStdHandle((unsigned long)-11); // STD_OUTPUT_HANDLE (-11)
947
- if (hConOut && hConOut != (void*)-1 && GetConsoleMode(hConOut, &dwMode))
+ if (hConOut && hConOut != (void*)-1 && GetConsoleMode(hConOut, &dwMode) && !(dwMode & 0x4))
948
SetConsoleMode(hConOut, dwMode | 0x4); // ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4)
949
#endif
950
printf(ANSI_COLOR_YELLOW);
0 commit comments