diff options
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( |