summaryrefslogtreecommitdiff
path: root/src/resources/sdl2softwarescreenshothelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/sdl2softwarescreenshothelper.cpp')
-rw-r--r--src/resources/sdl2softwarescreenshothelper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/sdl2softwarescreenshothelper.cpp b/src/resources/sdl2softwarescreenshothelper.cpp
index e36745b82..af9982fa1 100644
--- a/src/resources/sdl2softwarescreenshothelper.cpp
+++ b/src/resources/sdl2softwarescreenshothelper.cpp
@@ -34,7 +34,7 @@
#ifndef SDL_BYTEORDER
#error missing SDL_endian.h
-#endif
+#endif // SDL_BYTEORDER
Sdl2SoftwareScreenshotHelper::Sdl2SoftwareScreenshotHelper() :
ScreenshotHelper()
@@ -58,11 +58,13 @@ SDL_Surface *Sdl2SoftwareScreenshotHelper::getScreenshot()
const int rmask = 0xff000000;
const int gmask = 0x00ff0000;
const int bmask = 0x0000ff00;
-#else
+#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
+
const int rmask = 0x000000ff;
const int gmask = 0x0000ff00;
const int bmask = 0x00ff0000;
-#endif
+#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
+
const int amask = 0x00000000;
SDL_Surface *const screenshot = MSDL_CreateRGBSurface(SDL_SWSURFACE,