src/video/quartz/SDL_QuartzEvents.m
changeset 1213 8eb191652834
parent 1212 7663bb0f52c7
child 1338 604d73db6802
equal deleted inserted replaced
1212:7663bb0f52c7 1213:8eb191652834
   707     NSDate *distantPast;
   707     NSDate *distantPast;
   708     NSEvent *event;
   708     NSEvent *event;
   709     NSRect winRect;
   709     NSRect winRect;
   710     NSAutoreleasePool *pool;
   710     NSAutoreleasePool *pool;
   711 
   711 
       
   712     if (!SDL_VideoSurface)
       
   713         return;  /* don't do anything if there's no screen surface. */
       
   714 
   712     /* Update activity every five seconds to prevent screensaver. --ryan. */
   715     /* Update activity every five seconds to prevent screensaver. --ryan. */
   713     static Uint32 screensaverTicks = 0;
   716     static Uint32 screensaverTicks = 0;
   714     Uint32 nowTicks = SDL_GetTicks();
   717     Uint32 nowTicks = SDL_GetTicks();
   715     if ((nowTicks - screensaverTicks) > 5000)
   718     if ((nowTicks - screensaverTicks) > 5000)
   716     {
   719     {