mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
gst-inspect: Add define guard for g_log_writer_supports_color()
g_log_writer_supports_color() was introduced since GLib 2.50.0 which is slightly higher version than our minimum required GLib version.
This commit is contained in:
parent
e9085043c1
commit
2af630b0c1
1 changed files with 5 additions and 0 deletions
|
@ -2077,11 +2077,16 @@ main (int argc, char *argv[])
|
|||
}
|
||||
#elif defined(G_OS_WIN32)
|
||||
{
|
||||
/* g_log_writer_supports_color is available since 2.50.0 */
|
||||
#if GLIB_CHECK_VERSION(2,50,0)
|
||||
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;
|
||||
#else
|
||||
colored_output = FALSE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue