diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-07 19:42:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-07 19:42:14 +0300 |
commit | 363bcc8b277f8c546d9bde4ec2eeae16bcd7f225 (patch) | |
tree | d6c116cf9fc11baa1c408563e22578a3b5a97385 /src | |
parent | 4f2ec4df6812edee46bb74815b5edaaa6f34d59b (diff) | |
download | manaplus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.gz manaplus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.bz2 manaplus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.xz manaplus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.zip |
fix for SDL2 software mode if screen surface not have alpha channel.
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/sdl2softwareimagehelper.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/resources/sdl2softwareimagehelper.h b/src/resources/sdl2softwareimagehelper.h index 907d2242e..99a1a67e9 100644 --- a/src/resources/sdl2softwareimagehelper.h +++ b/src/resources/sdl2softwareimagehelper.h @@ -95,7 +95,14 @@ class SDL2SoftwareImageHelper final : public ImageHelper SDL_Rect *const dstrect); static void setFormat(SDL_PixelFormat *const format) - { mFormat = format; } + { + mFormat = format; + if (mFormat) + { + mFormat->Amask = ~(format->Rmask + | format->Gmask | format->Bmask); + } + } protected: /** SDL_Surface to SDL_Surface Image loader */ |