summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-13 20:12:13 +0200
committerwm4 <wm4@nowhere>2014-07-13 20:12:13 +0200
commit417ffa8b40f1754f3062fe42db2842131babec72 (patch)
tree91494348b5b8efaf6f051009ce5628b7a3083339 /video/out/gl_common.c
parentd54d21cbd5fdcb3004b55f1779e87b23a3d4a6ea (diff)
downloadmpv-417ffa8b40f1754f3062fe42db2842131babec72.tar.bz2
mpv-417ffa8b40f1754f3062fe42db2842131babec72.tar.xz
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.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c6
1 files changed, 4 insertions, 2 deletions
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 <assert.h>
#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.