[Mplayer-cvslog] CVS: main/libvo vo_gl.c,1.10,1.11

Atmosfear atmos4 at mplayer.dev.hu
Mon Oct 1 22:56:36 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv5006/libvo

Modified Files:
	vo_gl.c 
Log Message:
-fs fix


Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vo_gl.c	13 Aug 2001 11:08:18 -0000	1.10
+++ vo_gl.c	1 Oct 2001 20:56:19 -0000	1.11
@@ -98,6 +98,7 @@
 init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
 {
 	int screen;
+        int dwidth,dheight;
 	unsigned int fg, bg;
 	char *hello = (title == NULL) ? "OpenGL rulez" : title;
 	char *name = ":0.0";
@@ -126,7 +127,23 @@
 	}
 
 	screen = DefaultScreen(mydisplay);
+        vo_screenwidth = DisplayWidth(mydisplay, myscreen);
+	vo_screenheight = DisplayHeight(mydisplay, myscreen);
 
+        dwidth=d_width; dheight=d_height;
+#ifdef X11_FULLSCREEN
+        if(fullscreen){ // handle flags correct
+          d_height=(int)((float)vo_screenwidth/(float)dwidth*(float)dheight);
+          d_height+=d_height%2; // round
+          d_width=vo_screenwidth;
+          if(dheight>vo_screenheight){
+            d_width=(int)((float)vo_screenheight/(float)dheight*(float)dwidth);
+            d_width+=d_width%2; // round
+            d_height=vo_screenheight;
+          }
+          dwidth=d_width; dheight=d_height;
+        }
+#endif
 	hint.x = 0;
 	hint.y = 0;
 	hint.width = d_width;




More information about the MPlayer-cvslog mailing list