summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
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;