Mercurial > mplayer.hg
comparison libvo/vo_xv.c @ 3558:1dbf58c3d50c
aspect ratio bug fix for gui
author | pontscho |
---|---|
date | Mon, 17 Dec 2001 14:19:37 +0000 |
parents | 48f0ac1e9d13 |
children | fc1db33734e7 |
comparison
equal
deleted
inserted
replaced
3557:8d317f1aeafe | 3558:1dbf58c3d50c |
---|---|
284 XGetGeometry( mDisplay,mywindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth ); | 284 XGetGeometry( mDisplay,mywindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth ); |
285 drwX=0; drwY=0; | 285 drwX=0; drwY=0; |
286 XTranslateCoordinates( mDisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot ); | 286 XTranslateCoordinates( mDisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot ); |
287 printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); | 287 printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); |
288 | 288 |
289 aspect(&dwidth,&dheight,A_NOZOOM); | |
289 if ( mFullscreen ) | 290 if ( mFullscreen ) |
290 { | 291 { |
292 aspect(&dwidth,&dheight,A_ZOOM); | |
291 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; | 293 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; |
292 drwcX+=drwX; | 294 drwcX+=drwX; |
293 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; | 295 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; |
294 drwcY+=drwY; | 296 drwcY+=drwY; |
295 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); | 297 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); |
363 dheight=vo_screenwidth * mdheight / mdwidth; | 365 dheight=vo_screenwidth * mdheight / mdwidth; |
364 } | 366 } |
365 } | 367 } |
366 #endif | 368 #endif |
367 | 369 |
370 aspect(&dwidth,&dheight,A_NOZOOM); | |
368 if ( mFullscreen ) | 371 if ( mFullscreen ) |
369 { | 372 { |
373 aspect(&dwidth,&dheight,A_ZOOM); | |
370 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; | 374 drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; |
371 drwcX+=drwX; | 375 drwcX+=drwX; |
372 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; | 376 drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; |
373 drwcY+=drwY; | 377 drwcY+=drwY; |
374 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); | 378 drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); |