diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-21 14:37:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:14 +0300 |
commit | ec1beaa2ee07368368e9bd45fe400eedc57419eb (patch) | |
tree | c8f4792dc2316c7cc852bcf6738dff7557d9b872 /src/resources/openglimagehelper.cpp | |
parent | 8d4af08b165e10d7e82380074ce733ee9d068c6a (diff) | |
download | manaplus-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.gz manaplus-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.bz2 manaplus-ec1beaa2ee07368368e9bd45fe400eedc57419eb.tar.xz manaplus-ec1beaa2ee07368368e9bd45fe400eedc57419eb.zip |
first part of fixes for compilation with SDL2
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r-- | src/resources/openglimagehelper.cpp | 4 |
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; |