From 9eef41dec15580623cfa62909221fbc1fbf41706 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Sep 2016 21:24:50 +0200 Subject: 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. --- options/m_config.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'options/m_config.c') 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 -- cgit v1.2.3