options: print any options set in verbose mode

So we will know whether someone uses broken config file options when
posting a log with -v.
This commit is contained in:
wm4 2013-12-23 17:30:19 +01:00
parent 9fb0441b16
commit fd081c467d
1 changed files with 5 additions and 0 deletions

View File

@ -490,6 +490,11 @@ static int m_config_parse_option(struct m_config *config, struct bstr name,
if ((flags & M_SETOPT_PRESERVE_CMDLINE) && co->is_set_from_cmdline) if ((flags & M_SETOPT_PRESERVE_CMDLINE) && co->is_set_from_cmdline)
set = false; set = false;
if (set) {
MP_VERBOSE(config, "Setting option '%.*s' = '%.*s' (flags = %d)\n",
BSTR_P(name), BSTR_P(param), flags);
}
// Check if this option isn't forbidden in the current mode // Check if this option isn't forbidden in the current mode
if ((flags & M_SETOPT_FROM_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) { if ((flags & M_SETOPT_FROM_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) {
MP_ERR(config, "The %.*s option can't be used in a config file.\n", MP_ERR(config, "The %.*s option can't be used in a config file.\n",