From e6ddb1fe3fabc31e06fc1ac6210b648fc5c06bf0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 Jan 2015 11:12:58 +0100 Subject: 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. --- video/out/gl_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3