aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl/openglsdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/openglsdl/openglsdl-graphics.cpp')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index ccb2572d33..75e2cf8ef7 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -642,8 +642,17 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
SDL_RWclose(file);
}
- saveScreenshot((screenshotsPath + filename).c_str());
- debug("Saved screenshot '%s'", filename.c_str());
+ if (saveScreenshot(screenshotsPath + filename)) {
+ 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;
}