changeset 15595:b4c3f02811dd

-geometry support for gl2 under win, default window pos centered for gl, gl2
author reimar
date Mon, 30 May 2005 08:45:21 +0000
parents 1c18214c932b
children 667c78f0fc60
files DOCS/man/en/mplayer.1 libvo/vo_gl.c libvo/vo_gl2.c libvo/w32_common.c
diffstat 4 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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);
 
--- 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);