diff options
author | wm4 <wm4@nowhere> | 2012-09-15 02:04:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-12 10:10:30 +0200 |
commit | a749c614375107a09e5877f6bb654133c7947672 (patch) | |
tree | 6c09bd53643d38178d7c4d07be2757620da5acfc /command.c | |
parent | 950999dd7bcf863535634e2ac227d19979beadd4 (diff) | |
download | mpv-a749c614375107a09e5877f6bb654133c7947672.tar.bz2 mpv-a749c614375107a09e5877f6bb654133c7947672.tar.xz |
commands: rename osd_show_[property_]text and osd_show_progression
osd_show_[property_]text => show_text
osd_show_progression => show_progress
show_text, osd_show_property_text and osd_show_text both map to the
code for the previous osd_show_property_text. The only special thing
about osd_show_text is that you don't need to escape "$". Also,
unfortunately osd_show_property_text requires escaping things twice,
one time for the command parser, and the other time for the property
formatting code, while osd_show_text needed only one level of escaping.
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -2313,22 +2313,14 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) break; } - case MP_CMD_OSD_SHOW_TEXT: - set_osd_msg(mpctx, OSD_MSG_TEXT, cmd->args[2].v.i, - (cmd->args[1].v.i < - 0 ? osd_duration : cmd->args[1].v.i), - "%s", cmd->args[0].v.s); - break; - - case MP_CMD_OSD_SHOW_PROPERTY_TEXT: { + case MP_CMD_SHOW_TEXT: { char *txt = m_properties_expand_string(mp_properties, cmd->args[0].v.s, mpctx); // if no argument supplied use default osd_duration, else <arg> ms. if (txt) { set_osd_msg(mpctx, OSD_MSG_TEXT, cmd->args[2].v.i, - (cmd->args[1].v.i < - 0 ? osd_duration : cmd->args[1].v.i), + (cmd->args[1].v.i < 0 ? osd_duration : cmd->args[1].v.i), "%s", txt); free(txt); } @@ -2392,7 +2384,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) mpctx->stop_play = PT_STOP; break; - case MP_CMD_OSD_SHOW_PROGRESSION: + case MP_CMD_SHOW_PROGRESS: mp_show_osd_progression(mpctx); break; |