changeset 31743:f3315500970f

Avoid some code duplication.
author reimar
date Sun, 25 Jul 2010 11:53:44 +0000
parents 8c22970585a7
children e87d7a5949b1
files libvo/vo_corevideo.m
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.m	Sun Jul 25 11:49:36 2010 +0000
+++ b/libvo/vo_corevideo.m	Sun Jul 25 11:53:44 2010 +0000
@@ -498,10 +498,8 @@
 
 	// 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)];