input: make input command deprecation warnings visible

Some time ago, all old special-cased commands (like "volume 1" to change
volume by one) have been removed. These commands are still emulated
using simple text replacement. This emulation is done to not break
everyone's input.conf, especially because the input.conf provided by
standard mplayer* still uses the old commands.

Every use of a deprecated command prints a replacement warning, which
was visible only with -v. Make these warnings visible by default.

There's actually not much reason to do this, but since commands like
"volume 5 1" don't work anymore, it's better to be verbose about this.

Also simplify the replacement for "vo_fullscreen".
This commit is contained in:
wm4 2013-03-25 20:49:11 +01:00
parent 1d530f0e31
commit 05e918be02
2 changed files with 3 additions and 3 deletions

View File

@ -221,7 +221,7 @@ static const struct legacy_cmd legacy_cmds[] = {
{"audio_delay", "add audio-delay"},
{"switch_audio", "cycle audio"},
{"balance", "add balance"},
{"vo_fullscreen", "no-osd cycle fullscreen"},
{"vo_fullscreen", "cycle fullscreen"},
{"panscan", "add panscan"},
{"vo_ontop", "cycle ontop"},
{"vo_border", "cycle border"},
@ -821,7 +821,7 @@ mp_cmd_t *mp_input_parse_cmd(bstr str, const char *loc)
if (bstrcasecmp(bstr_splice(str, 0, old_len),
(bstr) {(char *)entry->old, old_len}) == 0)
{
mp_tmsg(MSGT_INPUT, MSGL_V, "Warning: command '%s' is "
mp_tmsg(MSGT_INPUT, MSGL_WARN, "Warning: command '%s' is "
"deprecated, replaced with '%s' at %s.\n",
entry->old, entry->new, loc);
bstr s = bstr_cut(str, old_len);

View File

@ -75,7 +75,7 @@ static bool translate_legacy_property(const char *name, char *buffer,
}
if (strcmp(old_name, buffer) != 0) {
mp_msg(MSGT_CPLAYER, MSGL_V, "Warning: property '%s' is deprecated, "
mp_msg(MSGT_CPLAYER, MSGL_WARN, "Warning: property '%s' is deprecated, "
"replaced with '%s'. Fix your input.conf!\n", old_name, buffer);
}