diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-14 22:28:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-14 22:28:03 +0300 |
commit | 1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa (patch) | |
tree | e46eb7e8381dd3a88e4e1d86154d328b7a257ebb | |
parent | 5170fcc8693352970b2e2fcb9a13c896654c955b (diff) | |
download | mv-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.gz mv-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.bz2 mv-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.tar.xz mv-1ae3d65ebcb0ac5b139d1b64670374726fb2a4aa.zip |
show full screenshot path in chat if creating screenshot.
-rw-r--r-- | src/game.cpp | 10 |
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); } } |