Mercurial > mplayer.hg
diff mplayer.c @ 17241:3ab613cdf96a
add "pausing_keep" and "pausing_toggle" input cmd prefixes
author | ods15 |
---|---|
date | Sun, 25 Dec 2005 19:22:48 +0000 |
parents | 11459d1ff17c |
children | 400b7cb357a7 |
line wrap: on
line diff
--- a/mplayer.c Sun Dec 25 18:26:35 2005 +0000 +++ b/mplayer.c Sun Dec 25 19:22:48 2005 +0000 @@ -2448,6 +2448,7 @@ float next_frame_time=0; int frame_time_remaining=0; // flag int blit_frame=0; +int was_paused=0; osd_text_buffer[0]=0; // make sure OSD old does not stay around, @@ -3047,6 +3048,7 @@ guiGetEvent( guiCEvent,(char *)guiSetPlay ); } #endif + was_paused = 1; } // handle -sstep @@ -4129,11 +4131,20 @@ mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknown cmd %s\n",cmd->name); } } - if (cmd->pausing) - osd_function = OSD_PAUSE; + switch (cmd->pausing) { + case 1: // "pausing" + osd_function = OSD_PAUSE; + break; + case 3: // "pausing_toggle" + was_paused = !was_paused; + // fall through + case 2: // "pausing_keep" + if (was_paused) osd_function = OSD_PAUSE; + } mp_cmd_free(cmd); } } + was_paused = 0; if (seek_to_sec) { int a,b; float d;