changeset 18509:94965d83e2b6

do aspect correction of video size before calculating vo_dx and vo_dy. fixes misplaced video e.g. with -aspect 0.3 (window is not centered but near left border)
author reimar
date Sun, 14 May 2006 19:36:21 +0000
parents 6233f00d61c8
children 0107ab06df49
files libvo/vo_xmga.c libvo/vo_xv.c libvo/vo_xvmc.c
diffstat 3 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xmga.c	Sun May 14 17:56:04 2006 +0000
+++ b/libvo/vo_xmga.c	Sun May 14 19:36:21 2006 +0000
@@ -134,6 +134,7 @@
 
     vo_panscan_x = vo_panscan_y = vo_panscan_amount = 0;
 
+    aspect(&d_width, &d_height, A_NOZOOM);
     vo_dx = (vo_screenwidth - d_width) / 2;
     vo_dy = (vo_screenheight - d_height) / 2;
     geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
@@ -171,8 +172,6 @@
 
     inited = 1;
 
-    aspect(&d_width, &d_height, A_NOZOOM);
-
 #ifdef HAVE_NEW_GUI
     if (use_gui)
         guiGetEvent(guiSetShVideo, 0);  // the GUI will set up / resize the window
--- a/libvo/vo_xv.c	Sun May 14 17:56:04 2006 +0000
+++ b/libvo/vo_xv.c	Sun May 14 19:36:21 2006 +0000
@@ -191,6 +191,7 @@
     visible_buf = -1;
 
     update_xinerama_info();
+    aspect(&d_width, &d_height, A_NOZOOM);
     vo_dx = (vo_screenwidth - d_width) / 2;
     vo_dy = (vo_screenheight - d_height) / 2;
     geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
@@ -234,7 +235,6 @@
     {
         hint.x = vo_dx;
         hint.y = vo_dy;
-        aspect(&d_width, &d_height, A_NOZOOM);
         hint.width = d_width;
         hint.height = d_height;
 #ifdef HAVE_XF86VM
--- a/libvo/vo_xvmc.c	Sun May 14 17:56:04 2006 +0000
+++ b/libvo/vo_xvmc.c	Sun May 14 19:36:21 2006 +0000
@@ -605,6 +605,7 @@
    vo_mouse_autohide = 1;
 
    update_xinerama_info();
+   aspect(&d_width,&d_height,A_NOZOOM);
    vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
    geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
    vo_dx += xinerama_x;
@@ -623,7 +624,6 @@
    {
       hint.x = vo_dx;
       hint.y = vo_dy;
-      aspect(&d_width,&d_height,A_NOZOOM);
       hint.width = d_width;
       hint.height = d_height;
 #ifdef HAVE_XF86VM