diff options
author | Max Horn | 2008-03-29 23:20:53 +0000 |
---|---|---|
committer | Max Horn | 2008-03-29 23:20:53 +0000 |
commit | 85f8d617b09a05a4eecb18e542922772fadd279c (patch) | |
tree | cb2f77b991bdc348b921e402e23774604e0c47c5 | |
parent | 25b9a8a1cb3fd278d58179525ffe7f5ebca9bbb4 (diff) | |
download | scummvm-rg350-85f8d617b09a05a4eecb18e542922772fadd279c.tar.gz scummvm-rg350-85f8d617b09a05a4eecb18e542922772fadd279c.tar.bz2 scummvm-rg350-85f8d617b09a05a4eecb18e542922772fadd279c.zip |
Let mass detector add all hits, instead of only the first one
svn-id: r31307
-rw-r--r-- | gui/massadd.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 686fbc3f01..934957e80b 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -134,14 +134,13 @@ void MassAddDialog::handleTickle() { // Run the detector on the dir GameList candidates(PluginManager::instance().detectGames(files)); - if (candidates.size() >= 1) { - // At least one match was found. For now we just take the first one... - // a more sophisticated solution would do something more clever here, - // e.g. ask the user which one to pick (make sure to display the - // path, too). - GameDescriptor result = candidates[0]; + // Just add all detected games / game variants. If we get more than one, + // that either means the directory contains multiple games, or the detector + // could not fully determine which game variant it was seeing. In either + // case, let the user choose which entries he wants to keep. + for (GameList::const_iterator cand = candidates.begin(); cand != candidates.end(); ++cand) { + GameDescriptor result = *cand; result["path"] = dir.getPath(); - _games.push_back(result); } |