aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl
diff options
context:
space:
mode:
authorThierry Crozat2017-04-24 01:06:03 +0100
committerThierry Crozat2017-04-24 01:07:16 +0100
commita9ae691513f20018cc3798929dc6161828adfc7f (patch)
tree3e9f1b584381222ebc97367d5a01e14874bc1814 /backends/graphics/surfacesdl
parente96c057c3d7d2deb8ff31bc7d798d455f74b399a (diff)
downloadscummvm-rg350-a9ae691513f20018cc3798929dc6161828adfc7f.tar.gz
scummvm-rg350-a9ae691513f20018cc3798929dc6161828adfc7f.tar.bz2
scummvm-rg350-a9ae691513f20018cc3798929dc6161828adfc7f.zip
SDL: Improve debug and warning messages when saving screenshots
In particular this adds a warning when failing to save a screenshot in OpenGL mode (there was already one in SurfaceSDL mode).
Diffstat (limited to 'backends/graphics/surfacesdl')
-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;
}