From be8c9485b65f085e79f9e00689a721eb8fbdc7f8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 Mar 2017 17:40:57 +0100 Subject: vo_opengl: add log field to MGLContext Should have done this 1000 years ago. Now GL backends can use mp_log macros directly on the MPGLContext, instead of doing stupid things like for example MP_WARN(ctx->vo, ...). --- video/out/opengl/context.c | 1 + video/out/opengl/context.h | 1 + 2 files changed, 2 insertions(+) diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c index f7fce4fae5..63fed40de2 100644 --- a/video/out/opengl/context.c +++ b/video/out/opengl/context.c @@ -160,6 +160,7 @@ static MPGLContext *init_backend(struct vo *vo, const struct mpgl_driver *driver .vo = vo, .global = vo->global, .driver = driver, + .log = vo->log, }; if (probing) vo_flags |= VOFLAG_PROBING; diff --git a/video/out/opengl/context.h b/video/out/opengl/context.h index 0a02bd2867..ecb9d9c033 100644 --- a/video/out/opengl/context.h +++ b/video/out/opengl/context.h @@ -78,6 +78,7 @@ typedef struct MPGLContext { struct vo *vo; const struct mpgl_driver *driver; struct mpv_global *global; + struct mp_log *log; // For hwdec_vaegl.c. const char *native_display_type; -- cgit v1.2.3