summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-11-30 16:56:57 +0200
committerMartin Storsjö <martin@martin.st>2012-11-30 16:56:57 +0200
commit7e6a11bcf71777ea54a32916411bcebed0e90842 (patch)
tree6a22fb0b26a493530f6fd4dc91cf082442e1370e /libavutil/log.c
parentb70abd5b614341947ce7d81c1de97877dec5f35e (diff)
avutil: Use a configure check to enable windows console functions
Not all versions or API subsets of windows have these functions. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index d335944330..45c649aae6 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -41,7 +41,7 @@
static int av_log_level = AV_LOG_INFO;
static int flags;
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#if HAVE_SETCONSOLETEXTATTRIBUTE
#include <windows.h>
static const uint8_t color[] = { 12, 12, 12, 14, 7, 10, 11 };
static int16_t background, attr_orig;
@@ -59,7 +59,7 @@ static int use_color = -1;
static void colored_fputs(int level, const char *str)
{
if (use_color < 0) {
-#if defined(_WIN32) && !defined(__MINGW32CE__)
+#if HAVE_SETCONSOLETEXTATTRIBUTE
CONSOLE_SCREEN_BUFFER_INFO con_info;
con = GetStdHandle(STD_ERROR_HANDLE);
use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR") &&