summaryrefslogtreecommitdiffstats
path: root/options/m_config.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-23 21:24:50 +0200
committerwm4 <wm4@nowhere>2016-09-23 21:24:50 +0200
commit9eef41dec15580623cfa62909221fbc1fbf41706 (patch)
treedc03baf40c1905f3af4725404ad16d909f0d1964 /options/m_config.c
parentf0fd6633205fe0b477032d2be5028a204c327e0b (diff)
downloadmpv-9eef41dec15580623cfa62909221fbc1fbf41706.tar.bz2
mpv-9eef41dec15580623cfa62909221fbc1fbf41706.tar.xz
player: do not let pseudo-gui override user config settings
Seems like this confused users quite often. Instead of --profile=pseudo-gui, --player-operation-mode=pseudo-gui now has to be used to invoke pseudo GUI mode. The old way still works, and still behaves in the old way.
Diffstat (limited to 'options/m_config.c')
-rw-r--r--options/m_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/options/m_config.c b/options/m_config.c
index 5c8a99b372..576527c0c5 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -658,6 +658,10 @@ static int handle_set_opt_flags(struct m_config *config,
if ((flags & M_SETOPT_PRESERVE_CMDLINE) && co->is_set_from_cmdline)
set = false;
+ if ((flags & M_SETOPT_NO_OVERWRITE) &&
+ (co->is_set_from_cmdline || co->is_set_from_config))
+ set = false;
+
if ((flags & M_SETOPT_NO_FIXED) && (optflags & M_OPT_FIXED))
return M_OPT_INVALID;
@@ -680,6 +684,9 @@ void m_config_mark_co_flags(struct m_config_option *co, int flags)
{
if (flags & M_SETOPT_FROM_CMDLINE)
co->is_set_from_cmdline = true;
+
+ if (flags & M_SETOPT_FROM_CONFIG_FILE)
+ co->is_set_from_config = true;
}
// Unlike m_config_set_option_raw() this does not go through the property layer