aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/surfacesdl/surfacesdl-graphics.cpp')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index dd28f32bdc..ccfcc94ab3 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -2543,10 +2543,17 @@ bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
SDL_RWclose(file);
}
- if (saveScreenshot((screenshotsPath + filename).c_str()))
- debug("Saved screenshot '%s'", filename.c_str());
- else
- warning("Could not save screenshot");
+ if (saveScreenshot((screenshotsPath + filename).c_str())) {
+ if (screenshotsPath.empty())
+ debug("Saved screenshot '%s' in current directory", filename.c_str());
+ else
+ debug("Saved screenshot '%s' in directory '%s'", filename.c_str(), screenshotsPath.c_str());
+ } else {
+ if (screenshotsPath.empty())
+ warning("Could not save screenshot in current directory");
+ else
+ warning("Could not save screenshot in directory '%s'", screenshotsPath.c_str());
+ }
return true;
}