From 78fb544aeb8761e8d554487487bc27e610822e2d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 16 Dec 2015 01:03:19 +0300 Subject: Use screenshort helpers for creating screenshots --- src/render/sdl2softwaregraphics.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/render/sdl2softwaregraphics.cpp') diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index 3afadd27c..653fd5a68 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -790,28 +790,6 @@ void SDL2SoftwareGraphics::updateScreen() BLOCK_END("Graphics::updateScreen") } -SDL_Surface *SDL2SoftwareGraphics::getScreenshot() -{ -#if SDL_BYTEORDER == SDL_BIG_ENDIAN - const int rmask = 0xff000000; - const int gmask = 0x00ff0000; - const int bmask = 0x0000ff00; -#else - const int rmask = 0x000000ff; - const int gmask = 0x0000ff00; - const int bmask = 0x00ff0000; -#endif - const int amask = 0x00000000; - - SDL_Surface *const screenshot = MSDL_CreateRGBSurface(SDL_SWSURFACE, - mRect.w, mRect.h, 24, rmask, gmask, bmask, amask); - - if (screenshot) - SDL_BlitSurface(mSurface, nullptr, screenshot, nullptr); - - return screenshot; -} - void SDL2SoftwareGraphics::calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, -- cgit v1.2.3-60-g2f50