summaryrefslogtreecommitdiffstats
path: root/core/m_config.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-31 20:45:06 +0200
committerwm4 <wm4@nowhere>2013-07-31 20:56:00 +0200
commitd1de1e090f91a254f066505ee5811feda4d93dde (patch)
tree154365282fb60ceea2f44951fb96a9b48c044ad2 /core/m_config.h
parentd6592dd2e209ea6b10231206e8b5d856bef8afaa (diff)
downloadmpv-d1de1e090f91a254f066505ee5811feda4d93dde.tar.bz2
mpv-d1de1e090f91a254f066505ee5811feda4d93dde.tar.xz
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.
Diffstat (limited to 'core/m_config.h')
-rw-r--r--core/m_config.h5
1 files changed, 4 insertions, 1 deletions
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);