summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-03-18 17:40:57 +0100
committerwm4 <wm4@nowhere>2017-03-18 17:40:57 +0100
commitbe8c9485b65f085e79f9e00689a721eb8fbdc7f8 (patch)
treea3d143267757c9d0220e7858d738cbb832fac818
parent46e3dc27af20492dd24d228781b895f25abc3438 (diff)
downloadmpv-be8c9485b65f085e79f9e00689a721eb8fbdc7f8.tar.bz2
mpv-be8c9485b65f085e79f9e00689a721eb8fbdc7f8.tar.xz
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, ...).
-rw-r--r--video/out/opengl/context.c1
-rw-r--r--video/out/opengl/context.h1
2 files changed, 2 insertions, 0 deletions
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;