summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 11:50:05 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 11:50:05 +0000
commit4f25da3feed2aa3a6b94c989b176f17a3ce0a008 (patch)
tree42747f5ba7ac0e582b726dc57f6f99958392aa6b /libvo
parentba042d96874d44e1854bf0c8cc5e539ee34752f9 (diff)
downloadmpv-4f25da3feed2aa3a6b94c989b176f17a3ce0a008.tar.bz2
mpv-4f25da3feed2aa3a6b94c989b176f17a3ce0a008.tar.xz
better fullscreen-mode selection, patch by dunno :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3610 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_sdl.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 567f7f62d4..293287edfa 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -135,6 +135,7 @@ static vo_info_t vo_info =
};
#include <SDL.h>
+//#include <SDL/SDL_syswm.h>
#if defined(sun) && defined(__svr4__)
/* setenv is missing on solaris */
@@ -557,8 +558,19 @@ static void set_fullmode (int mode) {
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);