mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
gst-inspect: Fix ANSI escape sequence usage on Windows
Either disable it when it's not supported, or setup the console to interpret them correctly when it's supported. Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/351
This commit is contained in:
parent
a143d9cb0c
commit
7d2938ddca
1 changed files with 8 additions and 0 deletions
|
@ -2034,6 +2034,14 @@ main (int argc, char *argv[])
|
||||||
} else {
|
} else {
|
||||||
colored_output = FALSE;
|
colored_output = FALSE;
|
||||||
}
|
}
|
||||||
|
#elif defined(G_OS_WIN32)
|
||||||
|
{
|
||||||
|
gint fd = _fileno (stdout);
|
||||||
|
/* On Windows 10, g_log_writer_supports_color will also setup the console
|
||||||
|
* so that it correctly interprets ANSI VT sequences if it's supported */
|
||||||
|
if (!_isatty (fd) || !g_log_writer_supports_color (fd))
|
||||||
|
colored_output = FALSE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gst_tools_print_version ();
|
gst_tools_print_version ();
|
||||||
|
|
Loading…
Reference in a new issue