diff options
author | wm4 <wm4@nowhere> | 2016-09-05 21:04:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-05 21:04:17 +0200 |
commit | 4ab860cddc177047663bbe8940b0d34c621b6425 (patch) | |
tree | b13ac6888948d4b5f132d03f3ac243ea7790db73 /video/out/vo_opengl.c | |
parent | cc813647d54843e4731cc36160f0c1e04e4b1404 (diff) | |
download | mpv-4ab860cddc177047663bbe8940b0d34c621b6425.tar.bz2 mpv-4ab860cddc177047663bbe8940b0d34c621b6425.tar.xz |
options: add a mechanism to make sub-option replacement slightly easier
Instead of requiring each VO or AO to manually add members to MPOpts and
the global option table, make it possible to register them automatically
via vo_driver/ao_driver.global_opts members. This avoids modifying
options.c/options.h every time, including having to duplicate the exact
ifdeffery used to enable a driver.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, }; |