From 6765091bfac7782c0ef814f5983f4b92cccc3748 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 27 Aug 2009 18:36:51 +0000 Subject: Add infrastructure and test code to enable aspect scaling and panscan in windowed mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29566 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libvo/vo_gl.c') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 27d5463fc8..a281611c4c 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -163,11 +163,11 @@ static void resize(int x,int y){ glMatrixMode(GL_PROJECTION); glLoadIdentity(); ass_border_x = ass_border_y = 0; - if (vo_fs && use_aspect) { + if (aspect_scaling() && use_aspect) { int new_w, new_h; GLdouble scale_x, scale_y; - aspect(&new_w, &new_h, A_ZOOM); - panscan_calc(); + aspect(&new_w, &new_h, A_WINZOOM); + panscan_calc_windowed(); new_w += vo_panscan_x; new_h += vo_panscan_y; scale_x = (GLdouble)new_w / (GLdouble)x; @@ -722,7 +722,7 @@ static void flip_page(void) { if (vo_doublebuffering) { if (use_glFinish) glFinish(); swapGlBuffers(); - if (vo_fs && use_aspect) + if (aspect_scaling() && use_aspect) glClear(GL_COLOR_BUFFER_BIT); } else { do_render(); @@ -1148,7 +1148,7 @@ static int control(uint32_t request, void *data, ...) r->w = vo_dwidth; r->h = vo_dheight; r->mt = r->mb = r->ml = r->mr = 0; if (scaled_osd) {r->w = image_width; r->h = image_height;} - else if (vo_fs) { + else if (aspect_scaling()) { r->ml = r->mr = ass_border_x; r->mt = r->mb = ass_border_y; } -- cgit v1.2.3