diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-01 20:56:19 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-01 20:56:19 +0000 |
commit | 18c3d564697a27510283848dd47b7d6bf3938a71 (patch) | |
tree | b19087eb8bc12f67574947d61a40bcfb2200c1fd /libvo | |
parent | 00299755f20de33705a6909467fb4e6282cfef30 (diff) |
-fs fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2041 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_gl.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 990671dcc2..3de88bfb9c 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -98,6 +98,7 @@ 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) { int screen; + int dwidth,dheight; unsigned int fg, bg; char *hello = (title == NULL) ? "OpenGL rulez" : title; char *name = ":0.0"; @@ -126,7 +127,23 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 } 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; |