From 60aea74f4483661e34b12571add07f8e5e136660 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 24 Oct 2013 22:20:16 +0200 Subject: m_config: refactor option defaults handling Keep track of the default values directly, instead of creating a new instance of the option struct just to get the defaults. Also get rid of the special handling of m_obj_desc.init_options. Instead, handle it purely by the option parser. Originally, I wanted to handle --vo=opengl-hq and --vo=direct3d_shaders with this (by making them aliases to the real VOs with a different preset), but since --vo =opengl-hq=help prints the wrong values (as consequence of the simplification), I'm not doing that, and instead use something different. --- video/out/vo_direct3d.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'video/out/vo_direct3d.c') diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 9ad2322499..cd440f89f6 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -1720,6 +1720,13 @@ static const struct m_option opts[] = { {0} }; +static const d3d_priv defaults_noshaders = { + .colorspace = MP_CSP_DETAILS_DEFAULTS, + .video_eq = { MP_CSP_EQ_CAPS_COLORMATRIX }, + .opt_disable_shaders = 1, + .opt_disable_textures = 1, +}; + static const d3d_priv defaults = { .colorspace = MP_CSP_DETAILS_DEFAULTS, .video_eq = { MP_CSP_EQ_CAPS_COLORMATRIX }, @@ -1737,9 +1744,8 @@ const struct vo_driver video_out_direct3d = { .flip_page = flip_page, .uninit = uninit, .priv_size = sizeof(d3d_priv), - .priv_defaults = &defaults, + .priv_defaults = &defaults_noshaders, .options = opts, - .init_option_string = "disable-shaders:disable-textures", }; const struct vo_driver video_out_direct3d_shaders = { -- cgit v1.2.3