Early escape in text_color_init

This commit is contained in:
Daniel M. Weeks 2016-01-26 11:33:44 -05:00
parent 87d9fe00b8
commit bce03cdf2f
1 changed files with 20 additions and 22 deletions

View File

@ -207,10 +207,12 @@ void text_color_init (int enable_color)
g_enable_color = enable_color;
if (g_enable_color == 0) {
return;
}
#if __WIN32__
if (g_enable_color) {
HANDLE h;
CONSOLE_SCREEN_BUFFER_INFO csbi;
@ -229,15 +231,11 @@ void text_color_init (int enable_color)
coord.Y = 0;
FillConsoleOutputAttribute (h, attr, length, coord, &nwritten);
}
}
#else
if (g_enable_color) {
//printf ("%s", clear_eos);
printf ("%s", background_white);
printf ("%s", clear_eos);
printf ("%s", black);
}
#endif
}