1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 23:00:41 +00:00

Set modified window position and monitor aspect in vo_vm_switch instead of in

individual vo drivers.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27923 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-11-15 18:28:35 +00:00
parent f2bceedc49
commit c8d9e2eb60
3 changed files with 7 additions and 5 deletions

View File

@ -388,10 +388,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
vo_vm_switch(vm_width, vm_height, &modeline_width,
&modeline_height);
vo_dx = (vo_screenwidth - modeline_width) / 2;
vo_dy = (vo_screenheight - modeline_height) / 2;
vo_dwidth = modeline_width;
vo_dheight = modeline_height;
}
#endif
bg = WhitePixel(mDisplay, mScreen);

View File

@ -243,7 +243,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
}
vo_vm_switch(vm_width, vm_height, &modeline_width,
&modeline_height);
aspect_save_screenres(modeline_width, modeline_height);
} else
#endif
XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay),

View File

@ -1790,9 +1790,16 @@ void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width,
XF86VidModeLockModeSwitch(mDisplay, mScreen, 0);
XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]);
XF86VidModeSwitchToMode(mDisplay, mScreen, vidmodes[j]);
// FIXME: all this is more of a hack than proper solution
X = (vo_screenwidth - *modeline_width) / 2;
Y = (vo_screenheight - *modeline_height) / 2;
XF86VidModeSetViewPort(mDisplay, mScreen, X, Y);
vo_dx = X;
vo_dy = Y;
vo_dwidth = *modeline_width;
vo_dheight = *modeline_height;
aspect_save_screenres(*modeline_width, *modeline_height);
}
}