diff options
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r-- | gui/launcher.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 2be703a405..2c1212b84a 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -22,9 +22,7 @@ * $Id$ */ -#include "engines/engine.h" -#include "base/game.h" -#include "base/plugins.h" +#include "engines/metaengine.h" #include "base/version.h" #include "common/config-manager.h" @@ -574,27 +572,27 @@ void LauncherDialog::updateListing() { // Retrieve a list of all games defined in the config file _domains.clear(); const ConfigManager::DomainMap &domains = ConfMan.getGameDomains(); - ConfigManager::DomainMap::const_iterator iter = domains.begin(); + ConfigManager::DomainMap::const_iterator iter; for (iter = domains.begin(); iter != domains.end(); ++iter) { +#ifdef __DS__ + // DS port uses an extra section called 'ds'. This prevents the section from being + // detected as a game. + if (iter->_key == "ds") { + continue; + } +#endif + String gameid(iter->_value.get("gameid")); String description(iter->_value.get("description")); if (gameid.empty()) gameid = iter->_key; if (description.empty()) { - GameDescriptor g = Base::findGame(gameid); + GameDescriptor g = EngineMan.findGame(gameid); if (g.contains("description")) description = g.description(); } -#ifdef __DS__ - // DS port uses an extra section called 'ds'. This prevents the section from being - // detected as a game. - if (gameid == "ds") { - continue; - } -#endif - if (description.empty()) description = "Unknown (target " + iter->_key + ", gameid " + gameid + ")"; @@ -659,7 +657,7 @@ void LauncherDialog::addGame() { // ...so let's determine a list of candidates, games that // could be contained in the specified directory. - GameList candidates(PluginManager::instance().detectGames(files)); + GameList candidates(EngineMan.detectGames(files)); int idx; if (candidates.empty()) { @@ -783,7 +781,7 @@ void LauncherDialog::editGame(int item) { String gameId(ConfMan.get("gameid", _domains[item])); if (gameId.empty()) gameId = _domains[item]; - EditGameDialog editDialog(_domains[item], Base::findGame(gameId).description()); + EditGameDialog editDialog(_domains[item], EngineMan.findGame(gameId).description()); if (editDialog.runModal() > 0) { // User pressed OK, so make changes permanent |