changeset 25414:5c03a9bdf220

Record screen size and display size in vo_ variables.
author ulion
date Mon, 17 Dec 2007 15:49:54 +0000
parents 8368ae92c092
children a0a6541b1944
files libvo/vo_macosx.m
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Mon Dec 17 15:45:37 2007 +0000
+++ b/libvo/vo_macosx.m	Mon Dec 17 15:49:54 2007 +0000
@@ -111,6 +111,8 @@
 		screen_id = 0;
 	}
 	screen_frame = [screen_handle frame];
+	vo_screenwidth = screen_frame.size.width;
+	vo_screenheight = screen_frame.size.height;
 
 	//misc mplayer setup
 	image_width = width;
@@ -669,6 +671,8 @@
 	int padding = 0;
 	
 	NSRect frame = [self frame];
+	vo_dwidth = frame.size.width;
+	vo_dheight = frame.size.height;
 	
 	glViewport(0, 0, frame.size.width, frame.size.height);
 	glMatrixMode(GL_PROJECTION);
@@ -820,8 +824,11 @@
 		old_frame = [window frame];	//save main window size & position
 		if(screen_force)
 			screen_frame = [screen_handle frame];
-		else
+		else {
 			screen_frame = [[window screen] frame];
+			vo_screenwidth = screen_frame.size.width;
+			vo_screenheight = screen_frame.size.height;
+		}
 
 		[window setFrame:screen_frame display:YES animate:animate]; //zoom-in window with nice useless sfx
 		old_view_frame = [self bounds];