mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user