summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 6aed74113..67af6655f 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -152,7 +152,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
}
#ifdef USE_SDL2
- SDL_SetSurfaceAlphaMod(tmpImage, 255);
+ SDL_SetSurfaceAlphaMod(tmpImage, SDL_ALPHA_OPAQUE);
#else
// Make sure the alpha channel is not used, but copied to destination
SDL_SetAlpha(tmpImage, 0, SDL_ALPHA_OPAQUE);
@@ -180,6 +180,9 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
|| amask != tmpImage->format->Amask)
{
oldImage = tmpImage;
+#ifdef USE_SDL2
+ SDL_SetSurfaceBlendMode (oldImage, SDL_BLENDMODE_NONE);
+#endif
tmpImage = SDL_CreateRGBSurface(SDL_SWSURFACE, realWidth, realHeight,
32, rmask, gmask, bmask, amask);