diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-21 00:24:13 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-08-21 00:24:13 +0000 |
commit | e8330802459898c08e15b47e982f9ed0ca195068 (patch) | |
tree | 9c56122161a56d24e7021962ed8fcd7c120df4f8 /mplayer.c | |
parent | 2133d125e2a4ee6843ec0f999bf6893afd36fb06 (diff) | |
download | mpv-e8330802459898c08e15b47e982f9ed0ca195068.tar.bz2 mpv-e8330802459898c08e15b47e982f9ed0ca195068.tar.xz |
Minor code cleanup
Move timed hiding of OSD progress bar to the same place where OSD
messages are timed out.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24111 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -1333,7 +1333,19 @@ static mp_osd_msg_t* get_osd_msg(void) { unsigned now = GetTimerMS(); unsigned diff; char hidden_dec_done = 0; - + + if (osd_visible) { + // 36000000 means max timed visibility is 1 hour into the future, if + // the difference is greater assume it's wrapped around from below 0 + if (osd_visible - now > 36000000) { + osd_visible = 0; + vo_osd_progbar_type = -1; // disable + vo_osd_changed(OSDTYPE_PROGBAR); + if (mpctx->osd_function != OSD_PAUSE) + mpctx->osd_function = OSD_PLAY; + } + } + if(!last_update) last_update = now; diff = now >= last_update ? now - last_update : 0; @@ -3477,18 +3489,6 @@ if(auto_quality>0){ current_module="pause"; - if(osd_visible){ - // 36000000 means max timed visibility is 1 hour into the future, if - // the difference is greater assume it's wrapped around from below 0 - if (osd_visible - GetTimerMS() > 36000000) { - osd_visible = 0; - vo_osd_progbar_type=-1; // disable - vo_osd_changed(OSDTYPE_PROGBAR); - if (mpctx->osd_function != OSD_PAUSE) - mpctx->osd_function = OSD_PLAY; - } - } - if (mpctx->osd_function == OSD_PAUSE) { pause_loop(); mpctx->was_paused = 1; |