summaryrefslogtreecommitdiff
path: root/src/fileio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.cpp')
-rw-r--r--src/fileio.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp
index 82b2f7c7e..95f3a1594 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -281,6 +281,7 @@ static const char * const _subdirs[] = {
"lang" PATHSEP,
"ai" PATHSEP,
"ai" PATHSEP "library" PATHSEP,
+ "game" PATHSEP,
};
assert_compile(lengthof(_subdirs) == NUM_SUBDIRS);
@@ -675,6 +676,9 @@ uint TarScanner::DoScan(Subdirectory sd)
num += fs.DoScan(AI_DIR);
num += fs.DoScan(AI_LIBRARY_DIR);
}
+ if (mode & TarScanner::GAME) {
+ num += fs.DoScan(GAME_DIR);
+ }
if (mode & TarScanner::SCENARIO) {
num += fs.DoScan(SCENARIO_DIR);
}
@@ -1195,7 +1199,7 @@ void DeterminePaths(const char *exe)
#endif
static const Subdirectory default_subdirs[] = {
- SAVE_DIR, AUTOSAVE_DIR, SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR
+ SAVE_DIR, AUTOSAVE_DIR, SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR
};
for (uint i = 0; i < lengthof(default_subdirs); i++) {
@@ -1210,7 +1214,7 @@ void DeterminePaths(const char *exe)
FioCreateDirectory(_searchpaths[SP_AUTODOWNLOAD_DIR]);
/* Create the directory for each of the types of content */
- const Subdirectory dirs[] = { SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR };
+ const Subdirectory dirs[] = { SCENARIO_DIR, HEIGHTMAP_DIR, BASESET_DIR, NEWGRF_DIR, AI_DIR, AI_LIBRARY_DIR, GAME_DIR };
for (uint i = 0; i < lengthof(dirs); i++) {
char *tmp = str_fmt("%s%s", _searchpaths[SP_AUTODOWNLOAD_DIR], _subdirs[dirs[i]]);
FioCreateDirectory(tmp);