summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-22 02:14:15 +0200
committerwm4 <wm4@nowhere>2013-07-22 02:14:15 +0200
commitb38e631ed211734f019e9844c00b1f72ddb20842 (patch)
treed7ccfa7c3dd66239961b60013b1ca1173bb7765e /video/out/gl_common.c
parent7bf1b9066cd179022f43c8d5b3d69cbce4b66e80 (diff)
downloadmpv-b38e631ed211734f019e9844c00b1f72ddb20842.tar.bz2
mpv-b38e631ed211734f019e9844c00b1f72ddb20842.tar.xz
vo_opengl: some option changes
Doing "mpv --vo=opengl:lscale=help" now lists possible scalers and exits. The "backend" suboption behaves similar. Make the "stereo" suboption a choice, instead of using magic integer values.
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 6ede196cb4..497387aa4f 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -43,6 +43,7 @@
#include "talloc.h"
#include "gl_common.h"
#include "core/options.h"
+#include "core/m_option.h"
#include "sub/sub.h"
#include "bitmap_packer.h"
@@ -879,6 +880,13 @@ int mpgl_find_backend(const char *name)
int mpgl_validate_backend_opt(const struct m_option *opt, struct bstr name,
struct bstr param)
{
+ if (bstr_equals0(param, "help")) {
+ mp_msg(MSGT_VO, MSGL_INFO, "OpenGL windowing backends:\n");
+ mp_msg(MSGT_VO, MSGL_INFO, " auto (autodetect)\n");
+ for (const struct backend *entry = backends; entry->name; entry++)
+ mp_msg(MSGT_VO, MSGL_INFO, " %s\n", entry->name);
+ return M_OPT_EXIT - 1;
+ }
char s[20];
snprintf(s, sizeof(s), "%.*s", BSTR_P(param));
return mpgl_find_backend(s) >= -1 ? 1 : M_OPT_INVALID;