# HG changeset patch # User reimar # Date 1347567143 0 # Node ID bfc7f38d3008608910525fac9f900f166dd41a66 # Parent a87c434ecaa305d1b846de9edc90e94265c96ec3 Minor code simplification. Also in preparation for further changes. diff -r a87c434ecaa3 -r bfc7f38d3008 libvo/vo_corevideo.m --- 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); } /*