[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.58,1.59
Atmosfear
atmos4 at mplayer.dev.hu
Wed Dec 19 12:50:07 CET 2001
Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv7348/libvo
Modified Files:
vo_sdl.c
Log Message:
better fullscreen-mode selection, patch by dunno :)
Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- vo_sdl.c 18 Oct 2001 02:42:20 -0000 1.58
+++ vo_sdl.c 19 Dec 2001 11:50:05 -0000 1.59
@@ -135,6 +135,7 @@
};
#include <SDL.h>
+//#include <SDL/SDL_syswm.h>
#if defined(sun) && defined(__svr4__)
/* setenv is missing on solaris */
@@ -557,8 +558,19 @@
SDL_Surface *newsurface = NULL;
/* if we haven't set a fullmode yet, default to the lowest res fullmode first */
- if(mode < 0)
- mode = priv->fullmode = findArrayEnd(priv->fullmodes) - 1;
+ /* But select a mode where the full video enter */
+ if (mode < 0) {
+ int i;
+ mode = 0; // Default to the biggest mode avaible
+ for(i = findArrayEnd(priv->fullmodes) - 1; i >=0; i--) {
+ if( (priv->fullmodes[i]->w >= priv->width) &&
+ (priv->fullmodes[i]->h >= priv->height) ) {
+ mode = i;
+ break;
+ }
+ }
+ priv->fullmode = mode;
+ }
aspect_save_screenres(priv->fullmodes[mode]->w, priv->fullmodes[mode]->h);
More information about the MPlayer-cvslog
mailing list