Skip to content

Commit

Permalink
Merge pull request #420 from somaen/disableSDLAlpha
Browse files Browse the repository at this point in the history
SDL: Avoid having SDL_SRCALPHA set even if we have alpha in the pixelformat.
  • Loading branch information
Strangerke committed Jan 13, 2014
2 parents 4df249b + 6677a97 commit 063d008
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backends/graphics/surfacesdl/surfacesdl-graphics.cpp
Expand Up @@ -746,6 +746,8 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
if (_screen == NULL)
error("allocating _screen failed");

// Avoid having SDL_SRCALPHA set even if we supplied an alpha-channel in the format.
SDL_SetAlpha(_screen, 0, 255);
#else
_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight, 8, 0, 0, 0, 0);
if (_screen == NULL)
Expand Down

0 comments on commit 063d008

Please sign in to comment.