[Scummvm-cvs-logs] SF.net SVN: scummvm: [31307] scummvm/trunk/gui/massadd.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Mar 30 00:20:54 CET 2008
Revision: 31307
http://scummvm.svn.sourceforge.net/scummvm/?rev=31307&view=rev
Author: fingolfin
Date: 2008-03-29 16:20:53 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
Let mass detector add all hits, instead of only the first one
Modified Paths:
--------------
scummvm/trunk/gui/massadd.cpp
Modified: scummvm/trunk/gui/massadd.cpp
===================================================================
--- scummvm/trunk/gui/massadd.cpp 2008-03-29 23:16:44 UTC (rev 31306)
+++ scummvm/trunk/gui/massadd.cpp 2008-03-29 23:20:53 UTC (rev 31307)
@@ -134,14 +134,13 @@
// 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);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list