aboutsummaryrefslogtreecommitdiff
path: root/sword2/sword2.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2004-12-09 15:06:49 +0000
committerRobert Göffringmann2004-12-09 15:06:49 +0000
commit0d7ab01640a2209167272936c624c32142131993 (patch)
treed9ec454332093ae1a6c4ca7f9b2954c5d4852e78 /sword2/sword2.cpp
parent58bf9028b16a1a6d125baa79b223de5e2a5aa0e0 (diff)
downloadscummvm-rg350-0d7ab01640a2209167272936c624c32142131993.tar.gz
scummvm-rg350-0d7ab01640a2209167272936c624c32142131993.tar.bz2
scummvm-rg350-0d7ab01640a2209167272936c624c32142131993.zip
Pass subdirectories to gamedetector functions
svn-id: r16002
Diffstat (limited to 'sword2/sword2.cpp')
-rw-r--r--sword2/sword2.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 27ce3e0ae3..82d7d0c0b7 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -80,12 +80,14 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) {
for (g = sword2_settings; g->name; ++g) {
// Iterate over all files in the given directory
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- const char *gameName = file->displayName().c_str();
+ if (!file->isDirectory()) {
+ const char *gameName = file->displayName().c_str();
- if (0 == scumm_stricmp(g->detectname, gameName)) {
- // Match found, add to list of candidates, then abort inner loop.
- detectedGames.push_back(g->toGameSettings());
- break;
+ if (0 == scumm_stricmp(g->detectname, gameName)) {
+ // Match found, add to list of candidates, then abort inner loop.
+ detectedGames.push_back(g->toGameSettings());
+ break;
+ }
}
}
}