changeset 24091:e7df91814c0f

Minor code cleanup Move timed hiding of OSD progress bar to the same place where OSD messages are timed out.
author uau
date Tue, 21 Aug 2007 00:24:13 +0000
parents 2bbb7c4fe0a8
children 32624daed9b6
files mplayer.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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;