[MPlayer-cvslog] CVS: main/libvo vo_gl.c, 1.71, 1.72 vo_gl2.c, 1.65, 1.66
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sat Jun 18 20:32:31 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv4241/libvo
Modified Files:
vo_gl.c vo_gl2.c
Log Message:
support -wid
Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- vo_gl.c 13 Jun 2005 20:09:05 -0000 1.71
+++ vo_gl.c 18 Jun 2005 18:32:29 -0000 1.72
@@ -72,6 +72,11 @@
static void resize(int x,int y){
mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y);
+ if (WinID >= 0) {
+ int top = 0, left = 0, w = x, h = y;
+ geometry(&top, &left, &w, &h, vo_screenwidth, vo_screenheight);
+ glViewport(top, left, w, h);
+ } else
glViewport( 0, 0, x, y );
glMatrixMode(GL_PROJECTION);
@@ -175,11 +180,15 @@
vo_dwidth = d_width;
vo_dheight= d_height;
guiGetEvent(guiSetShVideo, 0);
- setGlWindow(&gl_vinfo, &gl_context, vo_window);
- initGl(vo_dwidth, vo_dheight);
- return 0;
+ goto glconfig;
}
#endif
+ if (WinID >= 0) {
+ Window win_tmp;
+ int int_tmp;
+ vo_window = WinID ? (Window)WinID : mRootWin;
+ goto glconfig;
+ }
if ( vo_window == None ) {
unsigned int fg, bg;
XSizeHints hint;
@@ -246,6 +255,8 @@
vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
vo_x11_fullscreen();
+
+glconfig:
setGlWindow(&gl_vinfo, &gl_context, vo_window);
initGl(vo_dwidth, vo_dheight);
Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- vo_gl2.c 30 May 2005 08:45:21 -0000 1.65
+++ vo_gl2.c 18 Jun 2005 18:32:29 -0000 1.66
@@ -577,6 +577,13 @@
glViewport( (vo_screenwidth-*x)/2, (vo_screenheight-*y)/2, *x, *y);
} else {
//aspect(x, y, A_NOZOOM);
+#ifndef GL_WIN32
+ if (WinID >= 0) {
+ int top = 0, left = 0, w = *x, h = *y;
+ geometry(&top, &left, &w, &h, vo_screenwidth, vo_screenheight);
+ glViewport(top, left, w, h);
+ } else
+#endif
glViewport( 0, 0, *x, *y );
}
@@ -686,6 +693,10 @@
}
static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) {
+ if (WinID >= 0) {
+ vo_window = WinID ? (Window)WinID : mRootWin;
+ return 0;
+ }
if ( vo_window == None )
{
XSizeHints hint;
@@ -890,7 +901,7 @@
draw_alpha_fnc=draw_alpha_32; break;
}
- if (initGl(d_width, d_height) == -1)
+ if (initGl(vo_dwidth, vo_dheight) == -1)
return -1;
#ifndef GL_WIN32
if (vo_ontop) vo_x11_setlayer(mDisplay,vo_window, vo_ontop);
More information about the MPlayer-cvslog
mailing list