mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
checkasm: Check HAVE_GETSTDHANDLE here as well
This was missed in 63418e374f
.
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
e931119a41
commit
cbb254cb4c
@ -42,7 +42,7 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
|
||||
#include <windows.h>
|
||||
#define COLOR_RED FOREGROUND_RED
|
||||
#define COLOR_GREEN FOREGROUND_GREEN
|
||||
@ -374,7 +374,7 @@ static void color_printf(int color, const char *fmt, ...)
|
||||
static int use_color = -1;
|
||||
va_list arg;
|
||||
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
|
||||
static HANDLE con;
|
||||
static WORD org_attributes;
|
||||
|
||||
@ -403,7 +403,7 @@ static void color_printf(int color, const char *fmt, ...)
|
||||
va_end(arg);
|
||||
|
||||
if (use_color) {
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE
|
||||
#if HAVE_SETCONSOLETEXTATTRIBUTE && HAVE_GETSTDHANDLE
|
||||
SetConsoleTextAttribute(con, org_attributes);
|
||||
#else
|
||||
fprintf(stderr, "\x1b[0m");
|
||||
|
Loading…
Reference in New Issue
Block a user