[MPlayer-cvslog] CVS: main/libvo vo_gl.c, 1.89, 1.90 vo_gl2.c, 1.73, 1.74 w32_common.c, 1.13, 1.14

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Aug 21 11:59:48 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv17385

Modified Files:
	vo_gl.c vo_gl2.c w32_common.c 
Log Message:
-wid support for windows. Not well tested, might still behave a bit weird.


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- vo_gl.c	19 Aug 2005 12:23:34 -0000	1.89
+++ vo_gl.c	21 Aug 2005 09:59:45 -0000	1.90
@@ -79,13 +79,11 @@
 
 static void resize(int x,int y){
   mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y);
-#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 );
 
   glMatrixMode(GL_PROJECTION);

Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- vo_gl2.c	16 Aug 2005 23:24:52 -0000	1.73
+++ vo_gl2.c	21 Aug 2005 09:59:45 -0000	1.74
@@ -504,13 +504,11 @@
 	  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 );
   }
 

Index: w32_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/w32_common.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- w32_common.c	14 Aug 2005 23:16:17 -0000	1.13
+++ w32_common.c	21 Aug 2005 09:59:45 -0000	1.14
@@ -225,11 +225,15 @@
     }
   }
 
+    if (WinID >= 0)
+      vo_window = WinID;
+    else {
     vo_window = CreateWindowEx(0, classname, classname, WS_POPUP, CW_USEDEFAULT, 0, 100, 100, 0, 0, hInstance, 0);
     if (!vo_window) {
 	mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to create window!\n");
 	return 0;
     }
+    }
 
     vo_hdc = GetDC(vo_window);
 
@@ -259,6 +263,7 @@
     resetMode();
     ShowCursor(1);
     vo_depthonscreen = 0;
+    if (WinID >= 0)
     DestroyWindow(vo_window);
     vo_window = 0;
     UnregisterClass(classname, 0);




More information about the MPlayer-cvslog mailing list