diff options
author | wm4 <wm4@nowhere> | 2017-04-10 21:19:13 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-04-10 21:19:13 +0200 |
commit | 6dea8fceda981481798f6f492db54c6fd8708c3b (patch) | |
tree | 909de256cf9fd15602eb1f37eff72eedbb1c7acc /options/m_config.c | |
parent | 759ac6cc93bd1895a8f9233b8e9256889bdef6aa (diff) | |
download | mpv-6dea8fceda981481798f6f492db54c6fd8708c3b.tar.bz2 mpv-6dea8fceda981481798f6f492db54c6fd8708c3b.tar.xz |
options: deprecate --loop
Also "announce" the plans to undeprecate it with changed semantics
later. The deprecation period is needed to warn script authors and
client API users (etc.) of the change.
This is done because everyone seems to expect --loop to loop the current
file, not the playlist. Even in cases when only 1 file is on the
playlist, the --loop-file semantics seem to be preferred.
Diffstat (limited to 'options/m_config.c')
-rw-r--r-- | options/m_config.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/options/m_config.c b/options/m_config.c index 14aa56da51..16a0b38eb1 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -624,12 +624,16 @@ struct m_config_option *m_config_get_co(const struct m_config *config, const char *prefix = config->is_toplevel ? "--" : ""; if (co->opt->type == &m_option_type_alias) { const char *alias = (const char *)co->opt->priv; - // deprecation_message is not used, but decides whether it's a - // proper or deprecated alias. if (co->opt->deprecation_message && !co->warning_was_printed) { - MP_WARN(config, "Warning: option %s%s was replaced with " - "%s%s and might be removed in the future.\n", - prefix, co->name, prefix, alias); + if (co->opt->deprecation_message[0]) { + MP_WARN(config, "Warning: option %s%s was replaced with " + "%s%s: %s\n", prefix, co->name, prefix, alias, + co->opt->deprecation_message); + } else { + MP_WARN(config, "Warning: option %s%s was replaced with " + "%s%s and might be removed in the future.\n", + prefix, co->name, prefix, alias); + } co->warning_was_printed = true; } return m_config_get_co(config, bstr0(alias)); |