diff libvo/vo_gl.c @ 29524:b1a437cdc60d

Add infrastructure and test code to enable aspect scaling and panscan in windowed mode.
author reimar
date Thu, 27 Aug 2009 18:36:51 +0000
parents f17b515cb326
children eb2567b65311
line wrap: on
line diff
--- a/libvo/vo_gl.c	Thu Aug 27 14:12:38 2009 +0000
+++ b/libvo/vo_gl.c	Thu Aug 27 18:36:51 2009 +0000
@@ -163,11 +163,11 @@
   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 @@
   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 @@
       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;
       }