summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-10 21:19:13 +0200
committerwm4 <wm4@nowhere>2017-04-10 21:19:13 +0200
commit6dea8fceda981481798f6f492db54c6fd8708c3b (patch)
tree909de256cf9fd15602eb1f37eff72eedbb1c7acc /options/m_option.h
parent759ac6cc93bd1895a8f9233b8e9256889bdef6aa (diff)
downloadmpv-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_option.h')
-rw-r--r--options/m_option.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/options/m_option.h b/options/m_option.h
index f3a4e7bc1e..064b7f83b1 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -715,9 +715,12 @@ extern const char m_option_path_separator;
// If "--optname" was removed, but "--newname" has the same semantics.
// It will be redirected, and a warning will be printed on first use.
-#define OPT_REPLACED(optname, newname) \
+#define OPT_REPLACED_MSG(optname, newname, msg) \
{.name = optname, .type = &m_option_type_alias, .priv = newname, \
- .deprecation_message = "", .offset = -1}
+ .deprecation_message = (msg), .offset = -1}
+
+// Same, with a generic deprecation message.
+#define OPT_REPLACED(optname, newname) OPT_REPLACED_MSG(optname, newname, "")
// "--optname" doesn't exist, but inform the user about a replacement with msg.
#define OPT_REMOVED(optname, msg) \