diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-23 22:01:44 +0300 |
commit | 3c404128c4669a1f4f190e20a89553677717fc50 (patch) | |
tree | 2db4e5031089c800c4e00fd6244e578f44a7c910 /src/resources/sdlscreenshothelper.cpp | |
parent | 89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff) | |
download | manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2 manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz manaverse-3c404128c4669a1f4f190e20a89553677717fc50.zip |
Add missing comments into defines.
Diffstat (limited to 'src/resources/sdlscreenshothelper.cpp')
-rw-r--r-- | src/resources/sdlscreenshothelper.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/sdlscreenshothelper.cpp b/src/resources/sdlscreenshothelper.cpp index a7375d919..5062be44d 100644 --- a/src/resources/sdlscreenshothelper.cpp +++ b/src/resources/sdlscreenshothelper.cpp @@ -32,7 +32,7 @@ #ifndef SDL_BYTEORDER #error missing SDL_endian.h -#endif +#endif // SDL_BYTEORDER SdlScreenshotHelper::SdlScreenshotHelper() : ScreenshotHelper() @@ -56,11 +56,13 @@ SDL_Surface *SdlScreenshotHelper::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, @@ -71,7 +73,7 @@ SDL_Surface *SdlScreenshotHelper::getScreenshot() #ifndef USE_SDL2 if (screenshot) SDL_BlitSurface(mainGraphics->mWindow, nullptr, screenshot, nullptr); -#endif +#endif // USE_SDL2 return screenshot; } |