From 3cbf68b47079df130d2a767da7f6af352202112c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Jul 2015 22:59:04 +0200 Subject: command: add property indicating per-file options Fixes #2165, more or less. --- options/m_config.c | 2 ++ options/m_config.h | 1 + 2 files changed, 3 insertions(+) (limited to 'options') diff --git a/options/m_config.c b/options/m_config.c index e513019c59..030c144dfc 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -272,6 +272,7 @@ static void ensure_backup(struct m_config *config, struct m_config_option *co) m_option_copy(co->opt, bc->backup, co->data); bc->next = config->backup_opts; config->backup_opts = bc; + co->is_set_locally = true; } void m_config_restore_backups(struct m_config *config) @@ -282,6 +283,7 @@ void m_config_restore_backups(struct m_config *config) m_option_copy(bc->co->opt, bc->co->data, bc->backup); m_option_free(bc->co->opt, bc->backup); + bc->co->is_set_locally = false; talloc_free(bc); } } diff --git a/options/m_config.h b/options/m_config.h index 4b29c9cde3..89f620b6d3 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -39,6 +39,7 @@ struct mp_log; struct m_config_option { bool is_generated : 1; // Automatically added ("no-" options) bool is_set_from_cmdline : 1; // Set by user from command line + bool is_set_locally : 1; // Has a backup entry bool warning_was_printed : 1; const char *name; // Full name (ie option-subopt) const struct m_option *opt; // Option description -- cgit v1.2.3