summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-12 11:38:00 +0200
committerwm4 <wm4@nowhere>2014-04-12 11:38:00 +0200
commit839c3ae64b184ba9d37621507d74cb6052582d0b (patch)
treeec08271f2fe7b28c9ccee6ca33fb88047d449946 /options
parent5cfb180a8957f9f2fefbec3cd4e7dddf8d856896 (diff)
downloadmpv-839c3ae64b184ba9d37621507d74cb6052582d0b.tar.bz2
mpv-839c3ae64b184ba9d37621507d74cb6052582d0b.tar.xz
options: don't sort sub-option help output
Commit 2c2c1203 sorted the output of --list-options, but the same code ias also used for listing sub-options, such as --vo=scale:help. For sub- options, the order actually matters.
Diffstat (limited to 'options')
-rw-r--r--options/m_config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/options/m_config.c b/options/m_config.c
index 77078e58f2..ac3ccc3640 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -672,7 +672,8 @@ void m_config_print_option_list(const struct m_config *config)
struct m_config_option *sorted =
talloc_memdup(NULL, config->opts, config->num_opts * sizeof(sorted[0]));
- qsort(sorted, config->num_opts, sizeof(sorted[0]), sort_opt_compare);
+ if (config->is_toplevel)
+ qsort(sorted, config->num_opts, sizeof(sorted[0]), sort_opt_compare);
MP_INFO(config, "Options:\n\n");
for (int i = 0; i < config->num_opts; i++) {