From 839c3ae64b184ba9d37621507d74cb6052582d0b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 Apr 2014 11:38:00 +0200 Subject: 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. --- options/m_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'options') 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++) { -- cgit v1.2.3