From 4bb0138e18320778134ec1b6d8aaec0c145fe111 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Wed, 27 Jul 2005 19:18:10 +0000 Subject: [PATCH] Tell SDL to notfree my video surfaces (Damn, no how-to write a SDL driver) --- src/video/gem/SDL_gemvideo.c | 2 +- src/video/xbios/SDL_xbios.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/gem/SDL_gemvideo.c b/src/video/gem/SDL_gemvideo.c index 26ab0e943..8032b947e 100644 --- a/src/video/gem/SDL_gemvideo.c +++ b/src/video/gem/SDL_gemvideo.c @@ -696,7 +696,7 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current, } /*--- Initialize screen ---*/ - modeflags = 0; + modeflags = SDL_PREALLOC; if (VDI_bpp == 8) { modeflags |= SDL_HWPALETTE; } diff --git a/src/video/xbios/SDL_xbios.c b/src/video/xbios/SDL_xbios.c index 49e0a1e0b..b9b548eae 100644 --- a/src/video/xbios/SDL_xbios.c +++ b/src/video/xbios/SDL_xbios.c @@ -529,7 +529,7 @@ static SDL_Surface *XBIOS_SetVideoMode(_THIS, SDL_Surface *current, return(NULL); } - modeflags = SDL_FULLSCREEN; + modeflags = SDL_FULLSCREEN | SDL_PREALLOC; /* Allocate needed buffers: simple/double buffer and shadow surface */ new_video_mode = XBIOS_videomodes[bpp][mode];