changeset 35090:bfc7f38d3008

Minor code simplification. Also in preparation for further changes.
author reimar
date Thu, 13 Sep 2012 20:12:23 +0000
parents a87c434ecaa3
children 9fcfc9c5f038
files libvo/vo_corevideo.m
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.m	Thu Sep 13 19:57:24 2012 +0000
+++ b/libvo/vo_corevideo.m	Thu Sep 13 20:12:23 2012 +0000
@@ -485,24 +485,21 @@
 	vo_dwidth  = frame.size.width;
 	vo_dheight = frame.size.height;
 
-	glViewport(0, 0, frame.size.width, frame.size.height);
+	glViewport(0, 0, vo_dwidth, vo_dheight);
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
-	glOrtho(0, frame.size.width, frame.size.height, 0, -1.0, 1.0);
+	glOrtho(0, vo_dwidth, vo_dheight, 0, -1.0, 1.0);
 	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
 
+	d_width  = vo_dwidth;
+	d_height = vo_dheight;
 	//set texture frame
 	if(vo_keepaspect)
 	{
 		aspect(&d_width, &d_height, A_WINZOOM);
-
-		textureFrame = NSMakeRect((vo_dwidth - d_width) / 2, (vo_dheight - d_height) / 2, d_width, d_height);
 	}
-	else
-	{
-		textureFrame = frame;
-	}
+	textureFrame = NSMakeRect((vo_dwidth - d_width) / 2, (vo_dheight - d_height) / 2, d_width, d_height);
 }
 
 /*