From 417ffa8b40f1754f3062fe42db2842131babec72 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 13 Jul 2014 20:12:13 +0200 Subject: Remove some mp_msg calls with no trailing \n The final goal is all mp_msg calls produce complete lines. We want this because otherwise, race conditions could corrupt the terminal output, and it's inconvenient for the client API too. This commit works towards this goal. There's still code that has this not fixed yet, though. --- video/out/gl_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/gl_common.c b/video/out/gl_common.c index f9af3f32af..dd90bee322 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -41,6 +41,7 @@ #include #include "talloc.h" #include "gl_common.h" +#include "common/common.h" #include "options/options.h" #include "options/m_option.h" @@ -120,11 +121,12 @@ static const struct feature features[] = { static void list_features(int set, struct mp_log *log, int msgl, bool invert) { + char b[128] = {0}; for (const struct feature *f = &features[0]; f->id; f++) { if (invert == !(f->id & set)) - mp_msg(log, msgl, " [%s]", f->name); + mp_snprintf_cat(b, sizeof(b), " [%s]", f->name); } - mp_msg(log, msgl, "\n"); + mp_msg(log, msgl, "%s\n", b); } // This guesses if the current GL context is a suspected software renderer. -- cgit v1.2.3