mirror of https://github.com/mpv-player/mpv
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:
parent
c5e5f38563
commit
e6ddb1fe3f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue