[Scummvm-git-logs] scummvm master -> 0339b9a6bf0bd6f1a9bfb999f4bbca2da5416f4b
bluegr
bluegr at gmail.com
Wed Jan 22 19:27:43 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0339b9a6bf SDL: Use the name of the running target as a base for screenshot files
Commit: 0339b9a6bf0bd6f1a9bfb999f4bbca2da5416f4b
https://github.com/scummvm/scummvm/commit/0339b9a6bf0bd6f1a9bfb999f4bbca2da5416f4b
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2020-01-22T21:27:38+02:00
Commit Message:
SDL: Use the name of the running target as a base for screenshot files
Changed paths:
backends/graphics/sdl/sdl-graphics.cpp
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index e5a49ce..97b4a5f 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -279,13 +279,19 @@ void SdlGraphicsManager::saveScreenshot() {
if (sdl_g_system)
screenshotsPath = sdl_g_system->getScreenshotsPath();
- for (int n = 0;; n++) {
+ // Use the name of the running target as a base for screenshot file names
+ Common::String currentTarget = ConfMan.getActiveDomainName();
+
#ifdef USE_PNG
- filename = Common::String::format("scummvm%05d.png", n);
+ const char *extension = "png";
#else
- filename = Common::String::format("scummvm%05d.bmp", n);
+ const char *extension = "bmp";
#endif
+ for (int n = 0;; n++) {
+ filename = Common::String::format("scummvm%s%s-%05d.%s", currentTarget.empty() ? "" : "-",
+ currentTarget.c_str(), n, extension);
+
Common::FSNode file = Common::FSNode(screenshotsPath + filename);
if (!file.exists()) {
break;
More information about the Scummvm-git-logs
mailing list