summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-07 19:42:14 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-07 19:42:14 +0300
commit363bcc8b277f8c546d9bde4ec2eeae16bcd7f225 (patch)
treed6c116cf9fc11baa1c408563e22578a3b5a97385 /src/resources
parent4f2ec4df6812edee46bb74815b5edaaa6f34d59b (diff)
downloadplus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.gz
plus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.bz2
plus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.tar.xz
plus-363bcc8b277f8c546d9bde4ec2eeae16bcd7f225.zip
fix for SDL2 software mode if screen surface not have alpha channel.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/sdl2softwareimagehelper.h9
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 */