Implement -geometry for vo gl and gl2.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15590 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-05-29 17:04:51 +00:00
parent 8c430a1f89
commit 7322c396a9
3 changed files with 11 additions and 7 deletions

View File

@ -2154,7 +2154,7 @@ than the screen.
.br .br
.I NOTE: .I NOTE:
This option is only supported by the x11, xmga, xv, xvmc, xvidix, 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 .sp 1
.I EXAMPLE: .I EXAMPLE:
.PD 0 .PD 0

View File

@ -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_save_screenres(vo_screenwidth,vo_screenheight);
aspect(&d_width,&d_height,A_NOZOOM); aspect(&d_width,&d_height,A_NOZOOM);
geometry(&vo_dx, &vo_dy, &d_width, &d_height,
vo_screenwidth, vo_screenheight);
#ifdef X11_FULLSCREEN #ifdef X11_FULLSCREEN
// if( flags&VOFLAG_FULLSCREEN ){ // (-fs) // if( flags&VOFLAG_FULLSCREEN ){ // (-fs)
// aspect(&d_width,&d_height,A_ZOOM); // 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; vo_fs = VO_FALSE;
hint.x = 0; hint.x = vo_dx;
hint.y = 0; hint.y = vo_dy;
hint.width = d_width; hint.width = d_width;
hint.height = d_height; hint.height = d_height;
hint.flags = PPosition | PSize; 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); 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)) if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
vo_x11_fullscreen(); vo_x11_fullscreen();
setGlWindow(&gl_vinfo, &gl_context, vo_window); setGlWindow(&gl_vinfo, &gl_context, vo_window);

View File

@ -692,8 +692,8 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_
XVisualInfo *vinfo, vinfo_buf; XVisualInfo *vinfo, vinfo_buf;
XEvent xev; XEvent xev;
hint.x = 0; hint.x = vo_dx;
hint.y = 0; hint.y = vo_dy;
hint.width = d_width; hint.width = d_width;
hint.height = d_height; hint.height = d_height;
hint.flags = PPosition | PSize; 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 | 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)) if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
vo_x11_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_save_screenres(vo_screenwidth,vo_screenheight);
aspect(&d_width,&d_height,A_NOZOOM); 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 defined(HAVE_NEW_GUI) && !defined(GL_WIN32)
if (use_gui) { if (use_gui) {