changeset 3558:1dbf58c3d50c

aspect ratio bug fix for gui
author pontscho
date Mon, 17 Dec 2001 14:19:37 +0000
parents 8d317f1aeafe
children f61dcc63be5f
files libvo/vo_xmga.c libvo/vo_xv.c mplayer.c
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_xmga.c	Mon Dec 17 12:04:20 2001 +0000
+++ b/libvo/vo_xmga.c	Mon Dec 17 14:19:37 2001 +0000
@@ -124,8 +124,10 @@
          XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
          fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
 
+         aspect(&dwidth,&dheight,A_NOZOOM);
          if ( mFullscreen )
           {
+           aspect(&dwidth,&dheight,A_ZOOM);
            drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
            drwcX+=drwX;
            drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
--- a/libvo/vo_xv.c	Mon Dec 17 12:04:20 2001 +0000
+++ b/libvo/vo_xv.c	Mon Dec 17 14:19:37 2001 +0000
@@ -286,8 +286,10 @@
      XTranslateCoordinates( mDisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
      printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
 
+     aspect(&dwidth,&dheight,A_NOZOOM);
      if ( mFullscreen )
       {
+       aspect(&dwidth,&dheight,A_ZOOM);
        drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
        drwcX+=drwX;
        drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
@@ -365,8 +367,10 @@
      }
    #endif
 
+   aspect(&dwidth,&dheight,A_NOZOOM);
    if ( mFullscreen )
     {
+     aspect(&dwidth,&dheight,A_ZOOM);
      drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
      drwcX+=drwX;
      drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
--- a/mplayer.c	Mon Dec 17 12:04:20 2001 +0000
+++ b/mplayer.c	Mon Dec 17 14:19:37 2001 +0000
@@ -1136,8 +1136,8 @@
    if ( use_gui )
     {
      mplResizeToMovieSize( sh_video->disp_w,sh_video->disp_h );
-     moviewidth=screen_size_x=sh_video->disp_w;
-     movieheight=screen_size_y=sh_video->disp_h;
+     moviewidth=sh_video->disp_w;
+     movieheight=sh_video->disp_h;
      mplShMem->StreamType=stream->type;
      mplSetFileName( filename );
     }