diff options
author | frosch <frosch@openttd.org> | 2012-12-09 16:52:43 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-12-09 16:52:43 +0000 |
commit | edd9c0553a7ff735000cc52c9b02fa33db767521 (patch) | |
tree | 76e8bfb70df3f1b2ff3789f2e2ebf022ba0f8290 /src/fios.cpp | |
parent | 1c71fbe0f0a909b0fa865fcb1a83532c6ab871fd (diff) | |
download | openttd-edd9c0553a7ff735000cc52c9b02fa33db767521.tar.xz |
(svn r24804) -Add: Separate subdirectory for screenshots.
Diffstat (limited to 'src/fios.cpp')
-rw-r--r-- | src/fios.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index e948b5680..b2ed1ec50 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -555,6 +555,22 @@ void FiosGetHeightmapList(SaveLoadDialogMode mode) FiosGetFileList(mode, &FiosGetHeightmapListCallback, strcmp(base_path, _fios_path) == 0 ? HEIGHTMAP_DIR : NO_DIRECTORY); } +/** + * Get the directory for screenshots. + * @return path to screenshots + */ +const char *FiosGetScreenshotDir() +{ + static char *fios_screenshot_path = NULL; + + if (fios_screenshot_path == NULL) { + fios_screenshot_path = MallocT<char>(MAX_PATH); + FioGetDirectory(fios_screenshot_path, MAX_PATH, SCREENSHOT_DIR); + } + + return fios_screenshot_path; +} + #if defined(ENABLE_NETWORK) #include "network/network_content.h" #include "3rdparty/md5/md5.h" |