diff libvo/vo_quartz.c @ 17546:d878e3e313eb

let osx sleep if video is paused
author nplourde
date Tue, 07 Feb 2006 01:36:32 +0000
parents 3470c810527b
children 0e7291ee4b6b
line wrap: on
line diff
--- a/libvo/vo_quartz.c	Tue Feb 07 00:01:38 2006 +0000
+++ b/libvo/vo_quartz.c	Tue Feb 07 01:36:32 2006 +0000
@@ -888,21 +888,6 @@
 		SendEventToEventTarget (theEvent, theTarget);
 		ReleaseEvent(theEvent);
 	}
-
-	//update activity every 30 seconds to prevent
-	//screensaver from starting up.
-	DateTimeRec d;
-	unsigned long curTime;
-	static unsigned long lastTime = 0;
-	
-	GetTime(&d);
-	DateToSeconds( &d, &curTime);
-	
-	if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
-	{
-		UpdateSystemActivity(UsrActivity);
-		lastTime = curTime;
-	}
 }
 
 static void draw_osd(void)
@@ -996,6 +981,21 @@
 			lastTime = curTime;
 		}
 	}
+
+	//update activity every 30 seconds to prevent
+	//screensaver from starting up.
+	DateTimeRec d;
+	unsigned long curTime;
+	static unsigned long lastTime = 0;
+	
+	GetTime(&d);
+	DateToSeconds( &d, &curTime);
+	
+	if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
+	{
+		UpdateSystemActivity(UsrActivity);
+		lastTime = curTime;
+	}
 }
 
 static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)