src/video/quartz/SDL_QuartzEvents.m
changeset 619 bf816ce70144
parent 615 7ec821f3cbd0
child 624 fb78cadbfeb8
--- a/src/video/quartz/SDL_QuartzEvents.m	Sat May 03 19:48:37 2003 +0000
+++ b/src/video/quartz/SDL_QuartzEvents.m	Thu May 22 06:28:40 2003 +0000
@@ -389,6 +389,15 @@
     NSRect titleBarRect;
     NSAutoreleasePool *pool;
 
+    /* Update activity every five seconds to prevent screensaver. --ryan. */
+    static Uint32 screensaverTicks = 0;
+    Uint32 nowTicks = SDL_GetTicks();
+    if ((nowTicks - screensaverTicks) > 5000)
+    {
+        UpdateSystemActivity(UsrActivity);
+        screensaverTicks = nowTicks;
+    }
+
     pool = [ [ NSAutoreleasePool alloc ] init ];
     distantPast = [ NSDate distantPast ];