mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
aspect ratio bug fix for gui
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3559 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4ece33ab9a
commit
00c5d6e5cb
@ -124,8 +124,10 @@ static void set_window(){
|
||||
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;
|
||||
|
@ -286,8 +286,10 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
|
||||
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 @@ static void check_events(void)
|
||||
}
|
||||
#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;
|
||||
|
@ -1136,8 +1136,8 @@ current_module="init_libvo";
|
||||
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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user