From d1de1e090f91a254f066505ee5811feda4d93dde Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 31 Jul 2013 20:45:06 +0200 Subject: options: handle presets directly in m_config This means that "mpv -vo opengl-hq:help" will actually show the correct defaults, instead those of plain vo_opengl. --- core/m_config.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/m_config.h') diff --git a/core/m_config.h b/core/m_config.h index dbc334c3aa..09b4961a06 100644 --- a/core/m_config.h +++ b/core/m_config.h @@ -72,6 +72,7 @@ typedef struct m_config { const void *optstruct_defaults; size_t optstruct_size; const struct m_option *options; // top-level options + const char *suboptinit; void *optstruct; // struct mpopts or other } m_config_t; @@ -83,10 +84,12 @@ typedef struct m_config { // contains default values for all options // options: list of options. Each option defines a member of the optstruct // and a corresponding option switch or sub-option field. +// suboptinit: if not NULL, initialize the suboption string (used for presets) // Note that the m_config object will keep pointers to defaults and options. struct m_config *m_config_new(void *talloc_parent, size_t size, const void *defaults, - const struct m_option *options); + const struct m_option *options, + const char *suboptinit); struct m_config *m_config_from_obj_desc(void *talloc_parent, struct m_obj_desc *desc); -- cgit v1.2.3