mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Allocate all 16bit surfaces with the same bitformat as the HW surface (Fixes bug #1196374)
svn-id: r17929
This commit is contained in:
parent
947be5edc2
commit
d04492a05a
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user