summaryrefslogtreecommitdiffstats
path: root/core/m_config.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-10 21:06:00 +0200
committerwm4 <wm4@nowhere>2013-04-10 21:32:46 +0200
commit9df2260506f825a05ecd500496260292ef2481aa (patch)
treed17e38880cf9d54272dc0de153ff8a0713598493 /core/m_config.c
parent62daa08d3b9e32f6d7f81bae4407faab4347c90d (diff)
downloadmpv-9df2260506f825a05ecd500496260292ef2481aa.tar.bz2
mpv-9df2260506f825a05ecd500496260292ef2481aa.tar.xz
core: add --reset-on-next-file option
This option can be used to selectively reset settings when playing the next file in the playlist (i.e. restore mplayer and mplayer2 behavior). Might remove this option again should it turn out that nobody uses it.
Diffstat (limited to 'core/m_config.c')
-rw-r--r--core/m_config.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/m_config.c b/core/m_config.c
index b6c15d3d9a..65d60bdab9 100644
--- a/core/m_config.c
+++ b/core/m_config.c
@@ -258,6 +258,22 @@ void m_config_leave_file_local(struct m_config *config)
}
}
+void m_config_mark_file_local(struct m_config *config, const char *opt)
+{
+ struct m_config_option *co = m_config_get_co(config, bstr0(opt));
+ if (co) {
+ ensure_backup(config, co);
+ } else {
+ mp_tmsg(MSGT_CFGPARSER, MSGL_ERR, "Option %s not found.\n", opt);
+ }
+}
+
+void m_config_mark_all_file_local(struct m_config *config)
+{
+ for (struct m_config_option *co = config->opts; co; co = co->next)
+ ensure_backup(config, co);
+}
+
// Given an option --opt, add --no-opt (if applicable).
static void add_negation_option(struct m_config *config,
struct m_config_option *parent,