diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-11 16:14:28 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-11 16:14:28 +0000 |
commit | 2dc3b7951cc51e29b03ad1e9c9918ff9e9ef2f93 (patch) | |
tree | 19edf9c6b342ca7dcb74f14af9a71aaa7f2b5688 /libvo | |
parent | 6811f963587915918875b21b93927784a8680dc9 (diff) | |
download | mpv-2dc3b7951cc51e29b03ad1e9c9918ff9e9ef2f93.tar.bz2 mpv-2dc3b7951cc51e29b03ad1e9c9918ff9e9ef2f93.tar.xz |
fixed mode switching on Mac
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8150 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_sdl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 15a1ee1538..82fbec51e2 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -670,6 +670,14 @@ static void set_video_mode(int width, int height, int bpp, uint32_t sdlflags) struct sdl_priv_s *priv = &sdl_priv; SDL_Surface* newsurface; + if(priv->rgbsurface) + SDL_FreeSurface(priv->rgbsurface); + else if(priv->overlay) + SDL_FreeYUVOverlay(priv->overlay); + + priv->rgbsurface = NULL; + priv->overlay = NULL; + newsurface = SDL_SetVideoMode(width, height, bpp, sdlflags); if(newsurface) { @@ -693,6 +701,14 @@ static void set_fullmode (int mode) { SDL_Surface *newsurface = NULL; int screen_surface_w, screen_surface_h; + if(priv->rgbsurface) + SDL_FreeSurface(priv->rgbsurface); + else if(priv->overlay) + SDL_FreeYUVOverlay(priv->overlay); + + priv->rgbsurface = NULL; + priv->overlay = NULL; + /* if we haven't set a fullmode yet, default to the lowest res fullmode first */ /* But select a mode where the full video enter */ if(priv->X && priv->fulltype & FS) { |