From 4ab860cddc177047663bbe8940b0d34c621b6425 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Sep 2016 21:04:17 +0200 Subject: options: add a mechanism to make sub-option replacement slightly easier Instead of requiring each VO or AO to manually add members to MPOpts and the global option table, make it possible to register them automatically via vo_driver/ao_driver.global_opts members. This avoids modifying options.c/options.h every time, including having to duplicate the exact ifdeffery used to enable a driver. --- options/m_option.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'options/m_option.h') diff --git a/options/m_option.h b/options/m_option.h index d344a79db2..48afc23df7 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -130,6 +130,8 @@ struct m_obj_desc { // 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; + // For convenience: these are added as global command-line options. + const struct m_sub_options *global_opts; }; // Extra definition needed for \ref m_option_type_obj_settings_list options. -- cgit v1.2.3