1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 05:15:12 +00:00

Compute aspect ratio only once

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5048 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nick 2002-03-11 09:24:09 +00:00
parent fb104c64c3
commit 25cc3ede41

View File

@ -74,19 +74,6 @@ static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
static void set_window(int force_update,const vo_tune_info_t *info)
{
#ifdef HAVE_NEW_GUI
if (vo_fs)
{
dwidth = vo_screenwidth;
dheight = vo_screenwidth * vo_dheight / vo_dwidth;
}
else
{
dwidth = vo_dwidth;
dheight = vo_dheight;
}
#endif
XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &drwWidth,
&drwHeight, &drwBorderWidth, &drwDepth);
drwX = drwY = 0;
@ -98,11 +85,9 @@ static void set_window(int force_update,const vo_tune_info_t *info)
drwcX, drwcY, drwX, drwY, drwWidth, drwHeight);
/* following stuff copied from vo_xmga.c */
aspect(&dwidth, &dheight, A_NOZOOM);
#if X11_FULLSCREEN
if (vo_fs)
{
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;
@ -287,7 +272,8 @@ if (vo_window == None)
window_height = vo_screenheight;
}
#endif
dwidth = d_width;
dheight = d_height;
/* Make the window */
XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs);