summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-11 01:52:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-13 22:17:00 +0300
commit7ad6bc89291c198122f087a11fd9ab585ea87034 (patch)
tree5b88547634c99dfd549b50fe3491e56a71f48304 /src/game.cpp
parent4e12e0514a3ade4f693c49353c369028481999d1 (diff)
downloadmv-7ad6bc89291c198122f087a11fd9ab585ea87034.tar.gz
mv-7ad6bc89291c198122f087a11fd9ab585ea87034.tar.bz2
mv-7ad6bc89291c198122f087a11fd9ab585ea87034.tar.xz
mv-7ad6bc89291c198122f087a11fd9ab585ea87034.zip
Some changes in screenshot code.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 2314940d8..f0cf1e290 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -469,9 +469,8 @@ Game::~Game()
DepricatedEvent(EVENT_DESTRUCTED));
}
-bool Game::saveScreenshot()
+bool Game::createScreenshot()
{
- static unsigned int screenshotCount = 0;
SDL_Surface *screenshot = nullptr;
if (!config.getBoolValue("showip"))
@@ -490,6 +489,12 @@ bool Game::saveScreenshot()
if (!screenshot)
return false;
+ return saveScreenshot(screenshot);
+}
+
+bool Game::saveScreenshot(SDL_Surface *screenshot)
+{
+ static unsigned int screenshotCount = 0;
// Search for an unused screenshot name
std::stringstream filenameSuffix;
std::stringstream filename;