mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
GOB: do not add anymore all subdirectories to the search path in Adibou2
Only "envir", "applis", and any directory containing an "intro_ap.stk" file (indicates an Adibou/Adi application directory).
This commit is contained in:
parent
5d519ed33b
commit
bf652277aa
@ -34,8 +34,25 @@ Init_v7::~Init_v7() {
|
||||
|
||||
void Init_v7::initGame() {
|
||||
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
||||
// That way, an application can be added simply by copying it as a separate subdirectory, in the main game directory
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "*", 0, 4, true);
|
||||
|
||||
// Add the environment directory
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "envir");
|
||||
|
||||
// Add the application list directory
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, "applis");
|
||||
|
||||
// Add additional applications directories (e.g. "Read/Count 4-5 years").
|
||||
// We rely on the presence of an "intro_ap.itk" to determinate whether a subdirectory contains an applcation.
|
||||
Common::FSList subdirs;
|
||||
gameDataDir.getChildren(subdirs, Common::FSNode::kListDirectoriesOnly);
|
||||
for (const Common::FSNode &subdirNode : subdirs) {
|
||||
Common::FSDirectory subdir(subdirNode);
|
||||
if (subdir.hasFile("intro_ap.stk")) {
|
||||
debugC(1, kDebugFileIO, "Found Adibou/Adi application subdirectory \"%s\", adding it to the search path", subdir.getFSNode().getName().c_str());
|
||||
SearchMan.addSubDirectoryMatching(gameDataDir, subdir.getFSNode().getName(), 0, 4, true);
|
||||
}
|
||||
}
|
||||
|
||||
Init::initGame();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user