diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 11bc81910..91a9038c8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -536,8 +536,21 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot) struct tm *const timeinfo = localtime(&rawtime); strftime(buffer, 99, "%Y-%m-%d_%H-%M-%S", timeinfo); - const std::string screenShortStr = strprintf("%s_Screenshot_%s_", - branding.getValue("appName", "ManaPlus").c_str(), buffer); + const std::string serverName = client->getServerName(); + std::string screenShortStr; + if (serverName.empty()) + { + screenShortStr = strprintf("%s_Screenshot_%s_", + branding.getValue("appName", "ManaPlus").c_str(), + buffer); + } + else + { + screenShortStr = strprintf("%s_Screenshot_%s_%s_", + branding.getValue("appName", "ManaPlus").c_str(), + serverName.c_str(), buffer); + } + do { screenshotCount++; |