summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-24 23:59:05 -0300
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-24 23:59:05 -0300
commit2c07cb00360cb962d0bb543ce59ea028aa9e4e76 (patch)
treec1be1556ed7b5681d2d9a761015689da0efb04db
parent3f04bf2722bacf2fadd409b30f7dc548ca249847 (diff)
downloadmpv-2c07cb00360cb962d0bb543ce59ea028aa9e4e76.tar.bz2
mpv-2c07cb00360cb962d0bb543ce59ea028aa9e4e76.tar.xz
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.
-rw-r--r--core/mp_msg.c2
1 files changed, 1 insertions, 1 deletions
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;