summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-16 01:03:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-16 01:03:19 +0300
commit78fb544aeb8761e8d554487487bc27e610822e2d (patch)
tree45ec42f5dcba94cd391f54a4cef2c017d7318d38 /src/game.cpp
parentfcdc44b21bda79052205ca1884b7f3a1ebd32957 (diff)
downloadplus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.gz
plus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.bz2
plus-78fb544aeb8761e8d554487487bc27e610822e2d.tar.xz
plus-78fb544aeb8761e8d554487487bc27e610822e2d.zip
Use screenshort helpers for creating screenshots
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 4fd84cfcb..efc4bd0f0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -110,6 +110,7 @@
#include "resources/imagewriter.h"
#include "resources/mapreader.h"
#include "resources/resourcemanager.h"
+#include "resources/screenshothelper.h"
#include "resources/db/mapdb.h"
@@ -483,7 +484,7 @@ void Game::addWatermark()
bool Game::createScreenshot()
{
- if (!mainGraphics)
+ if (!mainGraphics || !screenshortHelper)
return false;
SDL_Surface *screenshot = nullptr;
@@ -491,16 +492,16 @@ bool Game::createScreenshot()
if (!config.getBoolValue("showip") && gui)
{
mainGraphics->setSecure(true);
- mainGraphics->prepareScreenshot();
+ screenshortHelper->prepare();
gui->draw();
addWatermark();
- screenshot = mainGraphics->getScreenshot();
+ screenshot = screenshortHelper->getScreenshot();
mainGraphics->setSecure(false);
}
else
{
addWatermark();
- screenshot = mainGraphics->getScreenshot();
+ screenshot = screenshortHelper->getScreenshot();
}
if (!screenshot)