diff options
author | wm4 <wm4@nowhere> | 2013-10-12 18:42:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-12 18:57:02 +0200 |
commit | f312528ebc6980a55e61089f6d5e891fe0b18067 (patch) | |
tree | 49e6e16f762eddc611e2fc0317ef241da2666edc /mpvcore | |
parent | 20988ee6076bac53015b6eaab753203ca7dd6a8c (diff) | |
download | mpv-f312528ebc6980a55e61089f6d5e891fe0b18067.tar.bz2 mpv-f312528ebc6980a55e61089f6d5e891fe0b18067.tar.xz |
command: preferably show "add"/"cycle"/"set" command errors on OSD
Before this, they were shown on terminal only. Now they use the OSD
mechanism, which shows them on the video window or the terminal,
depending on settings and what's available.
Diffstat (limited to 'mpvcore')
-rw-r--r-- | mpvcore/command.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c index c9eb21dd0b..fdb507962f 100644 --- a/mpvcore/command.c +++ b/mpvcore/command.c @@ -2401,12 +2401,12 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (r == M_PROPERTY_OK || r == M_PROPERTY_UNAVAILABLE) { show_property_osd(mpctx, cmd->args[0].v.s, cmd->on_osd); } else if (r == M_PROPERTY_UNKNOWN) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, - "Unknown property: '%s'\n", cmd->args[0].v.s); + set_osd_msg(mpctx, OSD_MSG_TEXT, osdl, osd_duration, + "Unknown property: '%s'", cmd->args[0].v.s); } else if (r <= 0) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, - "Failed to set property '%s' to '%s'.\n", - cmd->args[0].v.s, cmd->args[1].v.s); + set_osd_msg(mpctx, OSD_MSG_TEXT, osdl, osd_duration, + "Failed to set property '%s' to '%s'", + cmd->args[0].v.s, cmd->args[1].v.s); } break; } @@ -2424,12 +2424,12 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) if (r == M_PROPERTY_OK || r == M_PROPERTY_UNAVAILABLE) { show_property_osd(mpctx, cmd->args[0].v.s, cmd->on_osd); } else if (r == M_PROPERTY_UNKNOWN) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, - "Unknown property: '%s'\n", cmd->args[0].v.s); + set_osd_msg(mpctx, OSD_MSG_TEXT, osdl, osd_duration, + "Unknown property: '%s'", cmd->args[0].v.s); } else if (r <= 0) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, - "Failed to increment property '%s' by %g.\n", - cmd->args[0].v.s, s.inc); + set_osd_msg(mpctx, OSD_MSG_TEXT, osdl, osd_duration, + "Failed to increment property '%s' by %g", + cmd->args[0].v.s, s.inc); } break; } |