summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-15 01:57:55 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-15 02:18:03 +0300
commit47f0e16e34cf22701b7c0670297bb7288a55310d (patch)
treed2b89f146e42a11d88e3e3b99685aa4a93c124c4 /src/game.cpp
parent0c7a728ea5c63769c59e7cdbd13fc56cf3dd63fc (diff)
downloadmanaverse-47f0e16e34cf22701b7c0670297bb7288a55310d.tar.gz
manaverse-47f0e16e34cf22701b7c0670297bb7288a55310d.tar.bz2
manaverse-47f0e16e34cf22701b7c0670297bb7288a55310d.tar.xz
manaverse-47f0e16e34cf22701b7c0670297bb7288a55310d.zip
Add option to hide ip addresses on screenshots.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 4e7345340..8457cf079 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -431,8 +431,20 @@ Game::~Game()
static bool saveScreenshot()
{
static unsigned int screenshotCount = 0;
+ SDL_Surface *screenshot = 0;
+
+ if (!config.getBoolValue("showip"))
+ {
+ graphics->setSecure(true);
+ gui->draw();
+ screenshot = graphics->getScreenshot();
+ graphics->setSecure(false);
+ }
+ else
+ {
+ screenshot = graphics->getScreenshot();
+ }
- SDL_Surface *screenshot = graphics->getScreenshot();
if (!screenshot)
return false;