diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
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) |