From 465839a39512adc879c793393a570c5737350df1 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Jul 2010 11:53:44 +0000 Subject: vo_corevideo: Avoid some code duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31809 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_corevideo.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libvo/vo_corevideo.m') diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index fe6314ce5d..1dd9f59229 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -498,10 +498,8 @@ static int control(uint32_t request, void *data) // Use visibleFrame to position the window taking the menu bar and dock into account. // Also flip vo_dy since the screen origin is in the bottom left on OSX. - if (screen_id < 0) - visibleFrame = [[[mpGLView window] screen] visibleFrame]; - else - visibleFrame = [[[NSScreen screens] objectAtIndex:screen_id] visibleFrame]; + update_screen_info(); + visibleFrame = [screen_handle visibleFrame]; [window setFrameTopLeftPoint:NSMakePoint( visibleFrame.origin.x + vo_dx, visibleFrame.origin.y + visibleFrame.size.height - vo_dy)]; -- cgit v1.2.3