diff options
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo.c | 1 | ||||
-rw-r--r-- | video/out/vo.h | 4 | ||||
-rw-r--r-- | video/out/vo_opengl.c | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index ee554f0e6d..050a5303e6 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -174,6 +174,7 @@ static bool get_desc(struct m_obj_desc *dst, int index) .priv_size = vo->priv_size, .priv_defaults = vo->priv_defaults, .options = vo->options, + .global_opts = vo->global_opts, .hidden = vo->encode || !strcmp(vo->name, "opengl-cb"), .p = vo, }; diff --git a/video/out/vo.h b/video/out/vo.h index 15f9f9e7df..6a6101692c 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -296,6 +296,10 @@ struct vo_driver { // List of options to parse into priv struct (requires priv_size to be set) const struct m_option *options; + + // Global options to register if the VO is compiled in. + // mp_get_config_group() or other function can be used to access them. + const struct m_sub_options *global_opts; }; struct vo { diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 83f5840caa..a22f02bb5e 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -63,7 +63,7 @@ struct vo_opengl_opts { }; #define OPT_BASE_STRUCT struct vo_opengl_opts -const struct m_sub_options vo_opengl_conf = { +static const struct m_sub_options vo_opengl_conf = { .opts = (const m_option_t[]) { OPT_FLAG("opengl-glfinish", use_glFinish, 0), OPT_FLAG("opengl-waitvsync", waitvsync, 0), @@ -487,4 +487,5 @@ const struct vo_driver video_out_opengl = { .uninit = uninit, .priv_size = sizeof(struct gl_priv), .options = legacy_options, + .global_opts = &vo_opengl_conf, }; |