summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-30 11:12:58 +0100
committerwm4 <wm4@nowhere>2015-01-30 11:12:58 +0100
commite6ddb1fe3fabc31e06fc1ac6210b648fc5c06bf0 (patch)
tree5cf7abfa15c3cdfd4d494b2169a12e0cef9c22d7
parentc5e5f385636c910ea8a612b8954082606637f20a (diff)
downloadmpv-e6ddb1fe3fabc31e06fc1ac6210b648fc5c06bf0.tar.bz2
mpv-e6ddb1fe3fabc31e06fc1ac6210b648fc5c06bf0.tar.xz
vo_opengl: don't unnecessarily call glDebugMessageCallback()
We still do redundant calls to it, but obviously we can avoid calling it if we don't want to set a callback at all. May or may not help with default.
-rw-r--r--video/out/gl_video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 2aae1ad781..39a4e1783e 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -456,7 +456,8 @@ void gl_video_set_debug(struct gl_video *p, bool enable)
GL *gl = p->gl;
p->gl_debug = enable;
- gl_set_debug_logger(gl, (enable && p->gl->debug_context) ? p->log : NULL);
+ if (p->gl->debug_context)
+ gl_set_debug_logger(gl, enable ? p->log : NULL);
}
static void draw_triangles(struct gl_video *p, struct vertex *vb, int vert_count)