diff options
-rw-r--r-- | options/m_config.c | 5 | ||||
-rw-r--r-- | options/m_config.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/options/m_config.c b/options/m_config.c index d1bb72c13b..4912b21cf6 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -626,6 +626,11 @@ static int m_config_parse_option(struct m_config *config, struct bstr name, // Option with children are a bit different to parse if (co->opt->type->flags & M_OPT_TYPE_HAS_CHILD) { char prefix[110]; + if (!config->subopt_deprecation_warning) { + MP_WARN(config, "Suboptions (--%.*s=...) are deprecated. Use " + "flat options instead.\n", BSTR_P(name)); + config->subopt_deprecation_warning = true; + } assert(strlen(co->name) < 100); sprintf(prefix, "%s-", co->name); return parse_subopts(config, (char *)co->name, prefix, param, flags); diff --git a/options/m_config.h b/options/m_config.h index af8ab421f0..0d8b7961d0 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -77,6 +77,8 @@ typedef struct m_config { // For the command line parser int recursion_depth; + bool subopt_deprecation_warning; + void *optstruct; // struct mpopts or other } m_config_t; |