# HG changeset patch # User uau # Date 1187655853 0 # Node ID e7df91814c0f8f68c182006cef3c139c92a6501a # Parent 2bbb7c4fe0a8a8540e79da5971fcc977b8f775c2 Minor code cleanup Move timed hiding of OSD progress bar to the same place where OSD messages are timed out. diff -r 2bbb7c4fe0a8 -r e7df91814c0f mplayer.c --- a/mplayer.c Mon Aug 20 23:04:10 2007 +0000 +++ b/mplayer.c Tue Aug 21 00:24:13 2007 +0000 @@ -1333,7 +1333,19 @@ 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 @@ 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;