diff options
author | wm4 <wm4@nowhere> | 2013-10-24 22:20:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-24 22:50:13 +0200 |
commit | 60aea74f4483661e34b12571add07f8e5e136660 (patch) | |
tree | c1b0c94cbb926785cec0e56d7bd50fa18e9f4457 /mpvcore/m_option.h | |
parent | f6bceacaff0d2e1a1265d29372fcf7b34c57446c (diff) | |
download | mpv-60aea74f4483661e34b12571add07f8e5e136660.tar.bz2 mpv-60aea74f4483661e34b12571add07f8e5e136660.tar.xz |
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.
Diffstat (limited to 'mpvcore/m_option.h')
-rw-r--r-- | mpvcore/m_option.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpvcore/m_option.h b/mpvcore/m_option.h index 96219b317a..d357456f63 100644 --- a/mpvcore/m_option.h +++ b/mpvcore/m_option.h @@ -107,8 +107,8 @@ struct m_obj_desc { // For free use by the implementer of m_obj_list.get_desc const void *p; // If not NULL, options which should be set before applying other options. - // This member is usually set my m_obj_list_find() only. - // Only works if options is not NULL. + // This member is usually set by m_obj_list_find() only, and read by the + // option parser. It's not used anywhere else. const char *init_options; // Don't list entries with "help" bool hidden; |