SDL: Allow specifying the screenshot directory in the config file

There is no GUI option to set the screenshot directory, but this
allows power users to set it if they don't want to use the default.
This commit is contained in:
Thierry Crozat 2017-04-24 00:51:57 +01:00
parent 11dd33bb73
commit e96c057c3d
4 changed files with 30 additions and 8 deletions

View file

@ -573,7 +573,10 @@ Common::SaveFileManager *OSystem_SDL::getSavefileManager() {
//Not specified in base class
Common::String OSystem_SDL::getScreenshotsPath() {
return Common::String();
Common::String path = ConfMan.get("screenshotpath");
if (!path.empty() && !path.hasSuffix("/"))
path += "/";
return path;
}
#ifdef USE_OPENGL