summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-29 17:04:51 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-29 17:04:51 +0000
commit7322c396a9de56735f801becf4daaa647a4251b5 (patch)
tree7e8d3ed9cabb29aa540061f6d14ac9602b7a8065
parent8c430a1f89fcc816cd4f49a394bdef69965a94f4 (diff)
downloadmpv-7322c396a9de56735f801becf4daaa647a4251b5.tar.bz2
mpv-7322c396a9de56735f801becf4daaa647a4251b5.tar.xz
Implement -geometry for vo gl and gl2.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15590 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.12
-rw-r--r--libvo/vo_gl.c8
-rw-r--r--libvo/vo_gl2.c8
3 files changed, 11 insertions, 7 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index bf488978e9..067d256370 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -2154,7 +2154,7 @@ than the screen.
.br
.I NOTE:
This option is only supported by the x11, xmga, xv, xvmc, xvidix,
-directx and tdfxfb video output drivers.
+gl, gl2 (except under Windows), directx and tdfxfb video output drivers.
.sp 1
.I EXAMPLE:
.PD 0
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 4c03bbaec0..b3e58b4052 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -162,6 +162,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
aspect_save_screenres(vo_screenwidth,vo_screenheight);
aspect(&d_width,&d_height,A_NOZOOM);
+ geometry(&vo_dx, &vo_dy, &d_width, &d_height,
+ vo_screenwidth, vo_screenheight);
#ifdef X11_FULLSCREEN
// if( flags&VOFLAG_FULLSCREEN ){ // (-fs)
// aspect(&d_width,&d_height,A_ZOOM);
@@ -186,8 +188,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
vo_fs = VO_FALSE;
- hint.x = 0;
- hint.y = 0;
+ hint.x = vo_dx;
+ hint.y = vo_dy;
hint.width = d_width;
hint.height = d_height;
hint.flags = PPosition | PSize;
@@ -241,7 +243,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
}
if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
- vo_x11_nofs_sizepos(0, 0, d_width, d_height);
+ vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
vo_x11_fullscreen();
setGlWindow(&gl_vinfo, &gl_context, vo_window);
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 03b894171b..e52f149232 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -692,8 +692,8 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_
XVisualInfo *vinfo, vinfo_buf;
XEvent xev;
- hint.x = 0;
- hint.y = 0;
+ hint.x = vo_dx;
+ hint.y = vo_dy;
hint.width = d_width;
hint.height = d_height;
hint.flags = PPosition | PSize;
@@ -745,7 +745,7 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_
| ButtonPressMask | ButtonReleaseMask | ExposureMask
);
}
- vo_x11_nofs_sizepos(0, 0, d_width, d_height);
+ vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
vo_x11_fullscreen();
@@ -829,6 +829,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
aspect_save_screenres(vo_screenwidth,vo_screenheight);
aspect(&d_width,&d_height,A_NOZOOM);
+ geometry(&vo_dx, &vo_dy, &d_width, &d_height,
+ vo_screenwidth, vo_screenheight);
#if defined(HAVE_NEW_GUI) && !defined(GL_WIN32)
if (use_gui) {