Mercurial > mplayer.hg
diff libvo/vo_sdl.c @ 34611:f1a31e5fc35f
vo_sdl: reuse some more sdl_common code.
author | reimar |
---|---|
date | Sun, 12 Feb 2012 18:49:07 +0000 |
parents | a8497c26c9f1 |
children | 306ee51a2fa0 |
line wrap: on
line diff
--- a/libvo/vo_sdl.c Sun Feb 12 18:44:19 2012 +0000 +++ b/libvo/vo_sdl.c Sun Feb 12 18:49:07 2012 +0000 @@ -393,11 +393,7 @@ #if !defined( __AMIGAOS4__ ) && !defined( __APPLE__ ) priv->sdlfullflags |= SDL_DOUBLEBUF; - if (vo_doublebuffering) - priv->sdlflags |= SDL_DOUBLEBUF; #endif - if (!vo_border) - priv->sdlflags |= SDL_NOFRAME; /* get information about the graphics adapter */ vidInfo = SDL_GetVideoInfo (); @@ -499,7 +495,9 @@ priv->rgbsurface = NULL; priv->overlay = NULL; - newsurface = SDL_SetVideoMode(width, height, bpp, sdlflags); + vo_dwidth = width; + vo_dheight = height; + newsurface = sdl_set_mode(bpp, sdlflags); if(newsurface) { @@ -510,13 +508,9 @@ priv->surface = newsurface; priv->dstwidth = width; priv->dstheight = height; - vo_dwidth = width; - vo_dheight = height; setup_surfaces(); } - else - mp_msg(MSGT_VO,MSGL_WARN, "set_video_mode: SDL_SetVideoMode failed: %s\n", SDL_GetError()); } static void set_fullmode (int mode) { @@ -577,8 +571,9 @@ } /* try to change to given fullscreenmode */ - newsurface = SDL_SetVideoMode(priv->dstwidth, screen_surface_h, priv->bpp, - priv->sdlfullflags); + vo_dwidth = priv->dstwidth; + vo_dheight = screen_surface_h; + newsurface = sdl_set_mode(priv->bpp, priv->sdlfullflags); /* * In Mac OS X (and possibly others?) SDL_SetVideoMode() appears to @@ -614,8 +609,6 @@ SDL_SRF_UNLOCK(priv->surface) setup_surfaces(); } - else - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_SetVideoModeFailedFull, SDL_GetError()); }