diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-25 17:40:44 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:46 +0200 |
commit | 2e6847a352e0b0d856d247ddc78d752b47ddddd4 (patch) | |
tree | 47ced9320ff49e511d5f9d1e2079fb817767065f /libvo/vo_corevideo.m | |
parent | 902417b9999cda96ee47e07c6e4e299d78356469 (diff) | |
download | mpv-2e6847a352e0b0d856d247ddc78d752b47ddddd4.tar.bz2 mpv-2e6847a352e0b0d856d247ddc78d752b47ddddd4.tar.xz |
vo_corevideo: move mouse hiding to check_events
Move mouse hiding code to check_events, this allows mouse hiding
to continue to work with -idle -fixed-vo, after the video has
finished but the last frame is still displayed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31825 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 3d489299c1..a135d03723 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -717,8 +717,6 @@ static int control(uint32_t request, void *data) */ - (void) render { - int curTime; - glClear(GL_COLOR_BUFFER_BIT); glEnable(CVOpenGLTextureGetTarget(texture)); @@ -757,27 +755,6 @@ static int control(uint32_t request, void *data) } glFlush(); - - curTime = TickCount()/60; - - //automatically hide mouse cursor (and future on-screen control?) - if(isFullscreen && !mouseHide && !isRootwin) - { - if(curTime - lastMouseHide >= 5 || lastMouseHide == 0) - { - CGDisplayHideCursor(kCGDirectMainDisplay); - mouseHide = TRUE; - lastMouseHide = curTime; - } - } - - //update activity every 30 seconds to prevent - //screensaver from starting up. - if(curTime - lastScreensaverUpdate >= 30 || lastScreensaverUpdate == 0) - { - UpdateSystemActivity(UsrActivity); - lastScreensaverUpdate = curTime; - } } /* @@ -901,6 +878,27 @@ static int control(uint32_t request, void *data) */ - (void) check_events { + int curTime = TickCount()/60; + + //automatically hide mouse cursor (and future on-screen control?) + if(isFullscreen && !mouseHide && !isRootwin) + { + if(curTime - lastMouseHide >= 5 || lastMouseHide == 0) + { + CGDisplayHideCursor(kCGDirectMainDisplay); + mouseHide = TRUE; + lastMouseHide = curTime; + } + } + + //update activity every 30 seconds to prevent + //screensaver from starting up. + if(curTime - lastScreensaverUpdate >= 30 || lastScreensaverUpdate == 0) + { + UpdateSystemActivity(UsrActivity); + lastScreensaverUpdate = curTime; + } + event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSEventTrackingRunLoopMode dequeue:YES]; if (event == nil) return; |