From 2c07cb00360cb962d0bb543ce59ea028aa9e4e76 Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Wed, 24 Jul 2013 23:59:05 -0300 Subject: [PATCH] mp_msg: Support colors on cygwin A cygwin mpv will usually run inside mintty, and even if it were to be run in a regular console window, the cygwin dll emulates ANSI escapes. --- core/mp_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mp_msg.c b/core/mp_msg.c index ac59169fc2..86a544316e 100644 --- a/core/mp_msg.c +++ b/core/mp_msg.c @@ -138,7 +138,7 @@ static void set_msg_color(FILE* stream, int lev) #endif if (mp_msg_docolor()) { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) HANDLE *wstream = stream == stderr ? hSTDERR : hSTDOUT; if (c == -1) c = 7;