summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
diff options
context:
space:
mode:
Diffstat (limited to 'options/m_option.h')
-rw-r--r--options/m_option.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/options/m_option.h b/options/m_option.h
index a1039e2a82..405b59da0a 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -32,6 +32,7 @@ typedef struct m_option m_option_t;
struct m_config;
struct mp_log;
struct mpv_node;
+struct mpv_global;
///////////////////////////// Options types declarations ////////////////////
@@ -129,6 +130,10 @@ struct m_obj_desc {
bool hidden;
// Callback to print custom help if "help" is passed
void (*print_help)(struct mp_log *log);
+ // Callback that allows you to override the static default values. The
+ // pointer p points to the struct described by options/priv_size, with
+ // priv_defaults already applied. You can write to it to set any defaults.
+ void (*set_defaults)(struct mpv_global *global, void *p);
// Set by m_obj_list_find(). If the requested name is an old alias, this
// is set to the old name (while the name field uses the new name).
const char *replaced_name;