changeset 35072:5d9e4777593b

Avoid some more global variables.
author reimar
date Tue, 11 Sep 2012 20:29:15 +0000
parents e31eb09c681d
children cae3fc699368
files libvo/vo_corevideo.m
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.m	Tue Sep 11 20:11:34 2012 +0000
+++ b/libvo/vo_corevideo.m	Tue Sep 11 20:29:15 2012 +0000
@@ -63,8 +63,6 @@
 
 //Screen
 static int screen_id = -1;
-static NSRect screen_frame;
-static NSScreen *screen_handle;
 
 //image
 static unsigned char *image_data;
@@ -121,6 +119,8 @@
 static void update_screen_info(void)
 {
 	NSArray *screen_array;
+	NSScreen *screen_handle;
+	NSRect screen_frame;
 	if (screen_id == -1 && xinerama_screen > -1)
 		screen_id = xinerama_screen;
 
@@ -831,13 +831,10 @@
 		old_frame = [window frame];	//save main window size & position
 		update_screen_info();
 
-		[window setFrame:screen_frame display:YES animate:animate]; //zoom-in window with nice useless sfx
+		[window setFrame:NSMakeRect(xinerama_x, xinerama_y, vo_screenwidth, vo_screenheight) display:YES animate:animate]; //zoom-in window with nice useless sfx
 		old_view_frame = [self bounds];
 
-		//fix origin for multi screen setup
-		screen_frame.origin.x = 0;
-		screen_frame.origin.y = 0;
-		[self setFrame:screen_frame];
+		[self setFrame:NSMakeRect(0, 0, vo_screenwidth, vo_screenheight)];
 		[self setNeedsDisplay:YES];
 		[window setHasShadow:NO];
 		isFullscreen = 1;