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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 1180135a0..6aed74113 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -151,8 +151,12 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
tmpImage->w, tmpImage->h);
}
+#ifdef USE_SDL2
+ SDL_SetSurfaceAlphaMod(tmpImage, 255);
+#else
// Make sure the alpha channel is not used, but copied to destination
SDL_SetAlpha(tmpImage, 0, SDL_ALPHA_OPAQUE);
+#endif
// Determine 32-bit masks based on byte order
uint32_t rmask, gmask, bmask, amask;