# HG changeset patch # User reimar # Date 1117442721 0 # Node ID b4c3f02811dd2504e9018821a8f29c8cc02344a4 # Parent 1c18214c932b464e5cc1d7c99937a4d7bdcf65c9 -geometry support for gl2 under win, default window pos centered for gl, gl2 diff -r 1c18214c932b -r b4c3f02811dd DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Mon May 30 08:23:19 2005 +0000 +++ b/DOCS/man/en/mplayer.1 Mon May 30 08:45:21 2005 +0000 @@ -2154,7 +2154,7 @@ .br .I NOTE: This option is only supported by the x11, xmga, xv, xvmc, xvidix, -gl, gl2 (except under Windows), directx and tdfxfb video output drivers. +gl, gl2, directx and tdfxfb video output drivers. .sp 1 .I EXAMPLE: .PD 0 diff -r 1c18214c932b -r b4c3f02811dd libvo/vo_gl.c --- a/libvo/vo_gl.c Mon May 30 08:23:19 2005 +0000 +++ b/libvo/vo_gl.c Mon May 30 08:45:21 2005 +0000 @@ -162,6 +162,8 @@ aspect_save_screenres(vo_screenwidth,vo_screenheight); aspect(&d_width,&d_height,A_NOZOOM); + vo_dx = (vo_screenwidth - d_width) / 2; + vo_dy = (vo_screenheight - d_height) / 2; geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight); #ifdef X11_FULLSCREEN diff -r 1c18214c932b -r b4c3f02811dd libvo/vo_gl2.c --- a/libvo/vo_gl2.c Mon May 30 08:23:19 2005 +0000 +++ b/libvo/vo_gl2.c Mon May 30 08:45:21 2005 +0000 @@ -829,6 +829,8 @@ aspect_save_screenres(vo_screenwidth,vo_screenheight); aspect(&d_width,&d_height,A_NOZOOM); + vo_dx = (vo_screenwidth - d_width) / 2; + vo_dy = (vo_screenheight - d_height) / 2; geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight); diff -r 1c18214c932b -r b4c3f02811dd libvo/w32_common.c --- a/libvo/w32_common.c Mon May 30 08:23:19 2005 +0000 +++ b/libvo/w32_common.c Mon May 30 08:45:21 2005 +0000 @@ -180,7 +180,7 @@ updateScreenProperties(); vo_dwidth = vo_fs ? vo_screenwidth : o_dwidth; vo_dheight = vo_fs ? vo_screenheight : o_dheight; - SetWindowPos(vo_window, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); + SetWindowPos(vo_window, layer, vo_dx, vo_dy, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); PIXELFORMATDESCRIPTOR pfd; memset(&pfd, 0, sizeof pfd);