added intermediary function 'findGameOnePlugAtATime' and switched load game and run game code to use it. Added checks for DYNAMIC_MODULES defines to the checks for NEW_PLUGIN_DESIGN_FIRST_REFINEMENT

svn-id: r51746
This commit is contained in:
Tony Puccinelli 2010-08-05 00:26:46 +00:00
parent 520c0a4009
commit 66b42d486b
4 changed files with 28 additions and 12 deletions

View file

@ -708,7 +708,7 @@ void LauncherDialog::addGame() {
// ...so let's determine a list of candidates, games that
// could be contained in the specified directory.
GameList candidates(EngineMan.detectGames(files));
int idx;
if (candidates.empty()) {
// No game was found in the specified directory
@ -849,7 +849,12 @@ void LauncherDialog::loadGame(int item) {
gameId = _domains[item];
const EnginePlugin *plugin = 0;
#if defined(NEW_PLUGIN_DESIGN_FIRST_REFINEMENT) && defined(DYNAMIC_MODULES)
EngineMan.findGameOnePlugAtATime(gameId, &plugin);
#else
EngineMan.findGame(gameId, &plugin);
#endif
String target = _domains[item];
target.toLowercase();