Fix color codes
This commit is contained in:
@@ -215,6 +215,7 @@ os_list_dir(Arena *scratch, Allocator *a, String dir, U32 flags = LIST_NO_FLAGS)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool GLOBAL_EnabledConsoleColors;
|
||||
bool os_enable_console_colors() {
|
||||
// Set output mode to handle virtual terminal sequences
|
||||
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
@@ -223,6 +224,7 @@ bool os_enable_console_colors() {
|
||||
if (GetConsoleMode(hOut, &dwMode)) {
|
||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
if (SetConsoleMode(hOut, dwMode)) {
|
||||
GLOBAL_EnabledConsoleColors = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user