summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-22 01:21:39 +0200
committerwm4 <wm4@nowhere>2013-07-22 01:50:22 +0200
commit1ff35c3a20a3e0d8444eb1f6f1632db37255d761 (patch)
tree1449da2a0d39fa236f6a4e0f4c55239b6f02765a /video/out/gl_common.c
parent5e0ee41617387118deb463663176fb4d52a0a6e3 (diff)
downloadmpv-1ff35c3a20a3e0d8444eb1f6f1632db37255d761.tar.bz2
mpv-1ff35c3a20a3e0d8444eb1f6f1632db37255d761.tar.xz
vo_opengl_old: use new option API
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index 67b373d9c3..6ede196cb4 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -876,6 +876,14 @@ int mpgl_find_backend(const char *name)
return -2;
}
+int mpgl_validate_backend_opt(const struct m_option *opt, struct bstr name,
+ struct bstr param)
+{
+ char s[20];
+ snprintf(s, sizeof(s), "%.*s", BSTR_P(param));
+ return mpgl_find_backend(s) >= -1 ? 1 : M_OPT_INVALID;
+}
+
static MPGLContext *init_backend(struct vo *vo, MPGLSetBackendFn set_backend)
{
MPGLContext *ctx = talloc_ptrtype(NULL, ctx);