diff options
author | wm4 <wm4@nowhere> | 2015-10-01 20:57:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-01 20:57:29 +0200 |
commit | 98c4ab6d1329c95ec7454e80cc9a4d51ffab3c36 (patch) | |
tree | 40ee9d0e0a24ccb5dd4b36526d7f20f5a17518f3 | |
parent | 4a072059630fe7d57a5fbff97d7400cc83cafe4c (diff) | |
download | mpv-98c4ab6d1329c95ec7454e80cc9a4d51ffab3c36.tar.bz2 mpv-98c4ab6d1329c95ec7454e80cc9a4d51ffab3c36.tar.xz |
vo_opengl: make sw suboption work without explicit backend selection
You needed to select a GL backend with the backend suboption. This was
confusing.
Fixes #2361.
-rw-r--r-- | video/out/opengl/common.c | 2 | ||||
-rw-r--r-- | video/out/vo.h | 1 | ||||
-rw-r--r-- | video/out/vo_opengl.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index 7fced42d01..879aa7d879 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -619,7 +619,7 @@ static MPGLContext *init_backend(struct vo *vo, const struct backend *backend, if (ctx->gl->mpgl_caps & MPGL_CAP_SW) { MP_WARN(ctx->vo, "Suspected software renderer or indirect context.\n"); - if (vo->probing) + if (vo->probing && !(vo_flags & VOFLAG_SW)) goto cleanup; } diff --git a/video/out/vo.h b/video/out/vo.h index 4404500e67..1df3bc0e23 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -134,6 +134,7 @@ struct voctrl_get_equalizer_args { #define VOFLAG_GLES 0x20 // Hint to prefer GLES2 if possible #define VOFLAG_GL_DEBUG 0x40 // Hint to request debug OpenGL context #define VOFLAG_ALPHA 0x80 // Hint to request alpha framebuffer +#define VOFLAG_SW 0x100 // Hint to accept a software GL renderer // VO does handle mp_image_params.rotate in 90 degree steps #define VO_CAP_ROTATE90 1 diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index e41163be9c..7c287efc7c 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -395,7 +395,7 @@ static int preinit(struct vo *vo) vo_flags |= VOFLAG_GLES; if (p->allow_sw) - vo->probing = false; + vo_flags |= VOFLAG_SW; p->glctx = mpgl_init(vo, p->backend, vo_flags); if (!p->glctx) |