diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-16 01:03:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-16 01:03:19 +0300 |
commit | 78fb544aeb8761e8d554487487bc27e610822e2d (patch) | |
tree | 45ec42f5dcba94cd391f54a4cef2c017d7318d38 /src/resources/openglscreenshothelper.cpp | |
parent | fcdc44b21bda79052205ca1884b7f3a1ebd32957 (diff) | |
download | manaplus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.gz manaplus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.bz2 manaplus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.xz manaplus-78fb544aeb8761e8d554487487bc27e610822e2d.zip |
Use screenshort helpers for creating screenshots
Diffstat (limited to 'src/resources/openglscreenshothelper.cpp')
-rw-r--r-- | src/resources/openglscreenshothelper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/resources/openglscreenshothelper.cpp b/src/resources/openglscreenshothelper.cpp index ec561476e..9d0edd80e 100644 --- a/src/resources/openglscreenshothelper.cpp +++ b/src/resources/openglscreenshothelper.cpp @@ -44,18 +44,18 @@ OpenGLScreenshotHelper::~OpenGLScreenshotHelper() { } -void OpenGLScreenshotHelper::prepare(const int width, - const int height) +void OpenGLScreenshotHelper::prepare() { if (config.getBoolValue("usefbo")) - graphicsManager.createFBO(width, height, &mFbo); + graphicsManager.createFBO(mainGraphics->mWidth, + mainGraphics->mHeight, + &mFbo); } -SDL_Surface *OpenGLScreenshotHelper::getScreenshot(const int width, - const int height) +SDL_Surface *OpenGLScreenshotHelper::getScreenshot() { - const int h = height; - const int w = width - (width % 4); + const int h = mainGraphics->mHeight; + const int w = mainGraphics->mWidth - (mainGraphics->mWidth % 4); GLint pack = 1; SDL_Surface *const screenshot = MSDL_CreateRGBSurface( |