summaryrefslogtreecommitdiffstats
path: root/options/m_config.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-17 17:04:13 +0200
committerwm4 <wm4@nowhere>2016-09-17 17:04:13 +0200
commit7fa26bfd9c2c927e8f90089f2fe1822c72ea11d0 (patch)
treee9db3ad20f998880d74950e080f7f7fd475337d9 /options/m_config.c
parent4395a4f83709a538538cee9d14de522c024b1713 (diff)
downloadmpv-7fa26bfd9c2c927e8f90089f2fe1822c72ea11d0.tar.bz2
mpv-7fa26bfd9c2c927e8f90089f2fe1822c72ea11d0.tar.xz
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.
Diffstat (limited to 'options/m_config.c')
-rw-r--r--options/m_config.c15
1 files changed, 2 insertions, 13 deletions
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)