diff --git a/video/out/vo_gpu.c b/video/out/vo_gpu.c index 5df9e06f47..8a5e46bea0 100644 --- a/video/out/vo_gpu.c +++ b/video/out/vo_gpu.c @@ -47,6 +47,7 @@ struct gpu_priv { struct mp_log *log; struct ra_ctx *ctx; + bool force_gl; // for vo=opengl back-compat char *context_name; char *context_type; struct ra_ctx_opts opts; @@ -289,7 +290,8 @@ static int preinit(struct vo *vo) struct ra_ctx_opts opts = p->opts; opts.want_alpha = alpha_mode == 1; - p->ctx = ra_ctx_create(vo, p->context_type, p->context_name, opts); + const char *type = p->force_gl ? "opengl" : p->context_type; + p->ctx = ra_ctx_create(vo, type, p->context_name, opts); if (!p->ctx) goto err_out; assert(p->ctx->ra); @@ -361,7 +363,7 @@ static int preinit_opengl(struct vo *vo) " be removed in the future!\n"); struct gpu_priv *p = vo->priv; - p->context_type = "opengl"; + p->force_gl = true; return preinit(vo); }