summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-14 22:28:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-14 22:28:03 +0300
commit1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa (patch)
treee46eb7e8381dd3a88e4e1d86154d328b7a257ebb
parent5170fcc8693352970b2e2fcb9a13c896654c955b (diff)
downloadmanaplus-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.gz
manaplus-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.bz2
manaplus-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.xz
manaplus-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.zip
show full screenshot path in chat if creating screenshot.
-rw-r--r--src/game.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp
index e22b79715..11bc81910 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -541,26 +541,24 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot)
do
{
screenshotCount++;
- filenameSuffix.str("");
filename.str("");
filename << screenshotDirectory << "/";
- filenameSuffix << screenShortStr << screenshotCount << ".png";
- filename << filenameSuffix.str();
+ filename << screenShortStr << screenshotCount << ".png";
testExists.open(filename.str().c_str(), std::ios::in);
found = !testExists.is_open();
testExists.close();
}
while (!found);
- const bool success = ImageWriter::writePNG(screenshot, filename.str());
-
+ const std::string fileNameStr = filename.str();
+ const bool success = ImageWriter::writePNG(screenshot, fileNameStr);
if (success)
{
if (localChatTab)
{
// TRANSLATORS: save file message
std::string str = strprintf(_("Screenshot saved as %s"),
- filenameSuffix.str().c_str());
+ fileNameStr.c_str());
localChatTab->chatLog(str, BY_SERVER);
}
}