summaryrefslogtreecommitdiffstats
path: root/options/m_config.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-27 11:14:06 +0200
committerwm4 <wm4@nowhere>2017-06-27 11:14:06 +0200
commitc8930d0be283abef7701efb176a2225070392b2f (patch)
tree5ef9092dab7482a03afa05130a88d70c0ee1c5d6 /options/m_config.c
parent24b2d672ee08c1cabf042d5acfcd466c3214b0a2 (diff)
downloadmpv-c8930d0be283abef7701efb176a2225070392b2f.tar.bz2
mpv-c8930d0be283abef7701efb176a2225070392b2f.tar.xz
options: list suffix actions as options too
These are not "really" separate actions, but on the command line they're obserable as such. So it would be a good idea to list them too. Adds about 117 options (holy fuck).
Diffstat (limited to 'options/m_config.c')
-rw-r--r--options/m_config.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/options/m_config.c b/options/m_config.c
index 5de3b319d5..4c65867ae6 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -985,7 +985,7 @@ void m_config_print_option_list(const struct m_config *config, const char *name)
if (opt->flags & (M_OPT_MIN | M_OPT_MAX))
MP_INFO(config, " (or an integer)");
} else {
- MP_INFO(config, " %s", co->opt->type->name);
+ MP_INFO(config, " %s", opt->type->name);
}
if (opt->flags & (M_OPT_MIN | M_OPT_MAX)) {
snprintf(min, sizeof(min), "any");
@@ -998,7 +998,7 @@ void m_config_print_option_list(const struct m_config *config, const char *name)
}
char *def = NULL;
if (co->default_data)
- def = m_option_print(co->opt, co->default_data);
+ def = m_option_print(opt, co->default_data);
if (def) {
MP_INFO(config, " (default: %s)", def);
talloc_free(def);
@@ -1010,6 +1010,11 @@ void m_config_print_option_list(const struct m_config *config, const char *name)
if (opt->flags & M_OPT_FIXED)
MP_INFO(config, " [no runtime changes]");
MP_INFO(config, "\n");
+ for (int n = 0; opt->type->actions && opt->type->actions[n].name; n++) {
+ const struct m_option_action *action = &opt->type->actions[n];
+ MP_INFO(config, " %s%s-%s\n", prefix, co->name, action->name);
+ count++;
+ }
count++;
}
MP_INFO(config, "\nTotal: %d options\n", count);