summaryrefslogtreecommitdiffstats
path: root/libvo/vo_quartz.c
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-08 16:16:48 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-08 16:16:48 +0000
commitfd290901bb069ca3160bb6b4eb738c19e6a0159e (patch)
tree27d110b334ce2f825f5a7ae2ddc5d27635374744 /libvo/vo_quartz.c
parent310dda5ed03040987b3eb4e192eae87a1c73033e (diff)
downloadmpv-fd290901bb069ca3160bb6b4eb738c19e6a0159e.tar.bz2
mpv-fd290901bb069ca3160bb6b4eb738c19e6a0159e.tar.xz
Replace deprecated function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18058 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_quartz.c')
-rw-r--r--libvo/vo_quartz.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index b0d0497461..ebef1a3dc3 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -282,7 +282,7 @@ static OSStatus MouseEventHandler(EventHandlerCallRef nextHandler, EventRef even
{
if(vo_quartz_fs)
{
- ShowCursor();
+ CGDisplayShowCursor(kCGDirectMainDisplay);
mouseHide = FALSE;
}
}
@@ -967,16 +967,12 @@ static void flip_page(void)
//auto hide mouse cursor and futur on-screen control?
if(vo_quartz_fs && !mouseHide)
{
- DateTimeRec d;
- unsigned long curTime;
- static unsigned long lastTime = 0;
+ int curTime = TickCount()/60;
+ static int lastTime = 0;
- GetTime(&d);
- DateToSeconds( &d, &curTime);
-
if( ((curTime - lastTime) >= 5) || (lastTime == 0) )
{
- HideCursor();
+ CGDisplayHideCursor(kCGDirectMainDisplay);
mouseHide = TRUE;
lastTime = curTime;
}
@@ -984,14 +980,10 @@ static void flip_page(void)
//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))
+ int curTime = TickCount()/60;
+ static int lastTime = 0;
+
+ if( ((curTime/ - lastTime) >= 5) || (lastTime == 0) )
{
UpdateSystemActivity(UsrActivity);
lastTime = curTime;
@@ -1359,7 +1351,7 @@ void window_fullscreen()
if(device_id == 0)
{
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
- HideCursor();
+ CGDisplayHideCursor(kCGDirectMainDisplay);
mouseHide = TRUE;
}
@@ -1407,7 +1399,7 @@ void window_fullscreen()
SetSystemUIMode( kUIModeNormal, NULL);
//show mouse cursor
- ShowCursor();
+ CGDisplayShowCursor(kCGDirectMainDisplay);
mouseHide = FALSE;
//revert window to previous setting