[Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.32,1.33 vo_gl.c,1.12,1.13
Atmosfear
atmos4 at mplayer.dev.hu
Wed Oct 3 19:27:31 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv19521
Modified Files:
vo_xmga.c vo_gl.c
Log Message:
Use aspect()
Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- vo_xmga.c 1 Oct 2001 20:40:07 -0000 1.32
+++ vo_xmga.c 3 Oct 2001 17:27:13 -0000 1.33
@@ -47,6 +47,7 @@
#include "x11_common.h"
#include "sub.h"
+#include "aspect.h"
#ifdef SHOW_TIME
#include "../linux/timer.h"
@@ -258,14 +259,7 @@
wndWidth=vo_screenwidth;
wndHeight=vo_screenheight;
#ifdef X11_FULLSCREEN
- 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;
- }
+ aspect(&d_width,&d_height,vo_screenwidth,vo_screenheight);
dwidth=d_width; dheight=d_height;
#endif
}
Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- vo_gl.c 1 Oct 2001 22:38:16 -0000 1.12
+++ vo_gl.c 3 Oct 2001 17:27:13 -0000 1.13
@@ -33,6 +33,7 @@
#include <GL/gl.h>
#include "x11_common.h"
+#include "aspect.h"
static vo_info_t vo_info =
{
@@ -95,7 +96,7 @@
* allocate colors and (shared) memory
*/
static uint32_t
-init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
+init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
// int screen;
int dwidth,dheight;
@@ -121,15 +122,8 @@
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;
- }
+ if( flags&0x01 ){ // (-fs)
+ aspect(&d_width,&d_height,vo_screenwidth,vo_screenheight);
dwidth=d_width; dheight=d_height;
}
#endif
@@ -174,7 +168,7 @@
// printf("GLXcontext ok\n");
- if ( fullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
+ if ( flags&0x01 ) vo_x11_decoration( mDisplay,mywindow,0 );
XSelectInput(mDisplay, mywindow, StructureNotifyMask);
More information about the MPlayer-cvslog
mailing list