summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-02 18:56:16 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-02 18:56:16 +0000
commite1346b93e110aea1d10e8eda30b2effe2306a8bb (patch)
treec1204047e5d22bedd6f2c57183c3de64f48a1e62 /libvo
parentbbdc0c2055e58acffd0a2708d16ea637880c88b6 (diff)
downloadmpv-e1346b93e110aea1d10e8eda30b2effe2306a8bb.tar.bz2
mpv-e1346b93e110aea1d10e8eda30b2effe2306a8bb.tar.xz
fix for fs modes on widescreen displays
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8055 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_sdl.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 9d01b82dc9..e911a117b4 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -700,15 +700,24 @@ static void set_fullmode (int mode) {
screen_surface_h = priv->XHeight;
}
else if (mode < 0) {
- int i;
+ int i,j,imax;
mode = 0; // Default to the biggest mode avaible
+ if (verbose) for(i=0;priv->fullmodes[i];++i)
+ printf("SDL Mode: %d: %d x %d\n", i, priv->fullmodes[i]->w, priv->fullmodes[i]->h);
for(i = findArrayEnd(priv->fullmodes) - 1; i >=0; i--) {
if( (priv->fullmodes[i]->w >= priv->dstwidth) &&
(priv->fullmodes[i]->h >= priv->dstheight) ) {
- mode = i;
- break;
+ imax = i;
+ for (j = findArrayEnd(priv->fullmodes) - 1; j >=0; j--) {
+ if (priv->fullmodes[j]->w > priv->fullmodes[imax]->w
+ && priv->fullmodes[j]->h == priv->fullmodes[imax]->h)
+ imax = j;
+ }
+ mode = imax;
+ break;
+ }
}
- }
+ if (verbose) printf("SET SDL Mode: %d: %d x %d\n", mode, priv->fullmodes[mode]->w, priv->fullmodes[mode]->h);
priv->fullmode = mode;
screen_surface_h = priv->fullmodes[mode]->h;
screen_surface_w = priv->fullmodes[mode]->w;