summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-13 13:38:59 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-13 13:38:59 +0000
commitf49369b94d23d237c5f3accd9e30641c9be27636 (patch)
tree56b720c8a9d17249956a02678d89b77e4f193488
parent5bfa97c7f5862fdc7d8e3b9a3f8064a44b241f34 (diff)
downloadmpv-f49369b94d23d237c5f3accd9e30641c9be27636.tar.bz2
mpv-f49369b94d23d237c5f3accd9e30641c9be27636.tar.xz
Fix non-X11 build
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2183 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_sdl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 8e1e45510d..c38939f18b 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -565,10 +565,18 @@ static void set_fullmode (int mode) {
/* calculate new video size/aspect */
if(!priv->mode) {
if(priv->fulltype&FS) {
+#ifdef HAVE_X11
aspect(&newwidth, &newheight, priv->XWidth ? priv->XWidth : priv->dstwidth, priv->XHeight ? priv->XHeight : priv->dstheight);
+#else
+ aspect(&newwidth, &newheight, priv->dstwidth, priv->dstheight);
+#endif
} else
if(priv->fulltype&VM) {
+#ifdef HAVE_X11
aspect(&newwidth, &newheight, priv->dstwidth, (int)((float)priv->dstwidth*((float)priv->XHeight / (float)priv->XWidth)));
+#else
+ aspect(&newwidth, &newheight, priv->dstwidth, priv->dstheight);
+#endif
} else {
aspect(&newwidth, &newheight, priv->fullmodes[mode]->w, priv->fullmodes[mode]->h);
}
@@ -1085,7 +1093,11 @@ static void check_events (void)
else if ( keypressed == SDLK_n ) {
int newwidth = priv->dstwidth, newheight = priv->dstheight;
+#ifdef HAVE_X11
aspect(&newwidth, &newheight, priv->dstwidth, (int)((float)priv->dstwidth*((float)priv->XHeight / (float)priv->XWidth)));
+#else
+ aspect(&newwidth, &newheight, priv->dstwidth, priv->dstheight);
+#endif
if (priv->surface->w != newwidth || priv->surface->h != newheight) {
priv->surface = SDL_SetVideoMode(newwidth, newheight, priv->bpp, priv->sdlflags);
priv->windowsize.w = priv->surface->w;