diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-03 17:27:13 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-03 17:27:13 +0000 |
commit | ee2e0f2bdded371e07aa3999417fc8e7ef866d4a (patch) | |
tree | 243e3a32c7ae23a416c8506de732e7835397e541 /libvo | |
parent | 6a8fddc834ee0bb2150aa137dabd9a186d4586c0 (diff) |
Use aspect()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2058 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_gl.c | 16 | ||||
-rw-r--r-- | libvo/vo_xmga.c | 10 |
2 files changed, 7 insertions, 19 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 373f344f8f..ac4ec010d5 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -33,6 +33,7 @@ LIBVO_EXTERN(gl) #include <GL/gl.h> #include "x11_common.h" +#include "aspect.h" static vo_info_t vo_info = { @@ -95,7 +96,7 @@ static void resize(int x,int y){ * 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 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 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 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 // 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); diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index ee2b95e35b..f3a2f4d4df 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -47,6 +47,7 @@ LIBVO_EXTERN( xmga ) #include "x11_common.h" #include "sub.h" +#include "aspect.h" #ifdef SHOW_TIME #include "../linux/timer.h" @@ -258,14 +259,7 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_ 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 } |