aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2005-05-06 10:07:33 +0000
committerMax Horn2005-05-06 10:07:33 +0000
commitd04492a05a39a427ad5f0892a688e5122465ed3d (patch)
treeee098ef19831329d01ad59e7af111796fdbbddd5 /backends
parent947be5edc2fa2c000ad315c19f1711eea2fb4de0 (diff)
downloadscummvm-rg350-d04492a05a39a427ad5f0892a688e5122465ed3d.tar.gz
scummvm-rg350-d04492a05a39a427ad5f0892a688e5122465ed3d.tar.bz2
scummvm-rg350-d04492a05a39a427ad5f0892a688e5122465ed3d.zip
Allocate all 16bit surfaces with the same bitformat as the HW surface (Fixes bug #1196374)
svn-id: r17929
Diffstat (limited to 'backends')
-rw-r--r--backends/sdl/graphics.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index e430aae2b1..658a1f3739 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -355,17 +355,32 @@ void OSystem_SDL::loadGFXMode() {
InitScalers(565);
// Need some extra bytes around when using 2xSaI
- _tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth + 3, _screenHeight + 3, 16, 0, 0, 0, 0);
+ _tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _screenWidth + 3, _screenHeight + 3,
+ 16,
+ _hwscreen->format->Rmask,
+ _hwscreen->format->Gmask,
+ _hwscreen->format->Bmask,
+ _hwscreen->format->Amask);
if (_tmpscreen == NULL)
error("allocating _tmpscreen failed");
- _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth, _overlayHeight, 16, 0, 0, 0, 0);
+ _overlayscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth, _overlayHeight,
+ 16,
+ _hwscreen->format->Rmask,
+ _hwscreen->format->Gmask,
+ _hwscreen->format->Bmask,
+ _hwscreen->format->Amask);
if (_overlayscreen == NULL)
error("allocating _overlayscreen failed");
- _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth + 3, _overlayHeight + 3, 16, 0, 0, 0, 0);
+ _tmpscreen2 = SDL_CreateRGBSurface(SDL_SWSURFACE, _overlayWidth + 3, _overlayHeight + 3,
+ 16,
+ _hwscreen->format->Rmask,
+ _hwscreen->format->Gmask,
+ _hwscreen->format->Bmask,
+ _hwscreen->format->Amask);
if (_tmpscreen2 == NULL)
error("allocating _tmpscreen2 failed");