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. --- mpvcore/mplayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mpvcore/mplayer.c') diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index bfc5f7c4e1..f05fcd9795 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -4930,7 +4930,7 @@ static int mpv_main(int argc, char *argv[]) // Create the config context and register the options mpctx->mconfig = m_config_new(mpctx, sizeof(struct MPOpts), - &mp_default_opts, mp_opts, NULL); + &mp_default_opts, mp_opts); mpctx->opts = mpctx->mconfig->optstruct; mpctx->mconfig->includefunc = cfg_include; mpctx->mconfig->use_profiles = true; -- cgit v1.2.3