comparison 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
comparison
equal deleted inserted replaced
17545:a80e7a9862c6 17546:d878e3e313eb
886 if(theErr == noErr && theEvent != NULL) 886 if(theErr == noErr && theEvent != NULL)
887 { 887 {
888 SendEventToEventTarget (theEvent, theTarget); 888 SendEventToEventTarget (theEvent, theTarget);
889 ReleaseEvent(theEvent); 889 ReleaseEvent(theEvent);
890 } 890 }
891
892 //update activity every 30 seconds to prevent
893 //screensaver from starting up.
894 DateTimeRec d;
895 unsigned long curTime;
896 static unsigned long lastTime = 0;
897
898 GetTime(&d);
899 DateToSeconds( &d, &curTime);
900
901 if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
902 {
903 UpdateSystemActivity(UsrActivity);
904 lastTime = curTime;
905 }
906 } 891 }
907 892
908 static void draw_osd(void) 893 static void draw_osd(void)
909 { 894 {
910 vo_draw_text(imgRect.right,imgRect.bottom,draw_alpha); 895 vo_draw_text(imgRect.right,imgRect.bottom,draw_alpha);
993 { 978 {
994 HideCursor(); 979 HideCursor();
995 mouseHide = TRUE; 980 mouseHide = TRUE;
996 lastTime = curTime; 981 lastTime = curTime;
997 } 982 }
983 }
984
985 //update activity every 30 seconds to prevent
986 //screensaver from starting up.
987 DateTimeRec d;
988 unsigned long curTime;
989 static unsigned long lastTime = 0;
990
991 GetTime(&d);
992 DateToSeconds( &d, &curTime);
993
994 if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
995 {
996 UpdateSystemActivity(UsrActivity);
997 lastTime = curTime;
998 } 998 }
999 } 999 }
1000 1000
1001 static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) 1001 static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
1002 { 1002 {