From 7fa26bfd9c2c927e8f90089f2fe1822c72ea11d0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 17 Sep 2016 17:04:13 +0200 Subject: options: kill M_OPT_GLOBAL flag This meant "cannot be used as per-file option" (wrt. playlist items). Doesn't make too much sense anymore, especially given how obscure per-file options are. --- options/m_config.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'options/m_config.c') diff --git a/options/m_config.c b/options/m_config.c index ff8700d0e0..25c72ede9b 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -350,8 +350,6 @@ static void ensure_backup(struct m_config *config, struct m_config_option *co) { if (co->opt->type->flags & M_OPT_TYPE_HAS_CHILD) return; - if (co->opt->flags & M_OPT_GLOBAL) - return; if (!co->data) return; for (struct m_opt_backup *cur = config->backup_opts; cur; cur = cur->next) { @@ -671,15 +669,8 @@ static int handle_set_opt_flags(struct m_config *config, co->name); return M_OPT_INVALID; } - if (flags & M_SETOPT_BACKUP) { - if (optflags & M_OPT_GLOBAL) { - MP_ERR(config, "The %s option is global and can't be set per-file.\n", - co->name); - return M_OPT_INVALID; - } - if (set) - ensure_backup(config, co); - } + if ((flags & M_SETOPT_BACKUP) && set) + ensure_backup(config, co); return set ? 2 : 1; } @@ -979,8 +970,6 @@ void m_config_print_option_list(const struct m_config *config, const char *name) MP_INFO(config, " (default: %s)", def); talloc_free(def); } - if (opt->flags & M_OPT_GLOBAL) - MP_INFO(config, " [global]"); if (opt->flags & M_OPT_NOCFG) MP_INFO(config, " [nocfg]"); if (opt->flags & M_OPT_FILE) -- cgit v1.2.3