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.
This commit is contained in:
wm4 2015-01-30 11:12:58 +01:00
parent c5e5f38563
commit e6ddb1fe3f
1 changed files with 2 additions and 1 deletions

View File

@ -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)