From 6dea8fceda981481798f6f492db54c6fd8708c3b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Apr 2017 21:19:13 +0200 Subject: 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. --- options/m_config.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'options/m_config.c') 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)); -- cgit v1.2.3