summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-09 02:08:08 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:30 +0200
commita668ae0ff90c43ebcdea4f581aef0c98aeebd382 (patch)
treee1de875829472b0d6230372f02d7a81c9bcbeef0 /mplayer.c
parent6096966dee420179b65f4d2d3b93207419e58471 (diff)
downloadmpv-a668ae0ff90c43ebcdea4f581aef0c98aeebd382.tar.bz2
mpv-a668ae0ff90c43ebcdea4f581aef0c98aeebd382.tar.xz
commands: change input commands to make OSD usage explicit
Most input commands had their own policy whether to display an OSD message for user feedback or not. Some commands had two variants, one that showed an OSD message and one that didn't (e.g. step_property_osd and step_property). Change it such that all commands show a message on the OSD. Add a "no-osd" modifier that disables OSD for that command. Rename the "step_property" and "step_property_osd" command to "switch", and rename "set_property" and "set_property_osd" to "set". Note that commands which haven't used OSD before still don't use OSD. That will possibly be fixed later. (E.g. "screenshot" could display an OSD message instead of just printing a message on the terminal.) The chapter and edition properties still produce OSD messages even with "no-osd", because they don't map so well to the property_osd_display[] mechanism.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index d0abca3112..2d1843203f 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1240,6 +1240,8 @@ static mp_osd_msg_t *add_osd_msg(struct MPContext *mpctx, int id, int level,
static void set_osd_msg_va(struct MPContext *mpctx, int id, int level, int time,
const char *fmt, va_list ap)
{
+ if (level == OSD_LEVEL_INVISIBLE)
+ return;
mp_osd_msg_t *msg = add_osd_msg(mpctx, id, level, time);
msg->msg = talloc_vasprintf(msg, fmt, ap);
}