ENGINES: Simplify EngineManager::findTarget

Do not make it return the detection plugin. It's never used anymore and
tends to imply that detection plugin can be used alongside the engine
plugin.
This commit is contained in:
Le Philousophe 2024-06-02 19:27:38 +02:00 committed by Eugene Sandulenko
parent a92dab8a8c
commit 07daa6c225
3 changed files with 3 additions and 7 deletions

View File

@ -1290,8 +1290,7 @@ static Common::Error listRecords(const Common::String &singleTarget) {
// The name is a known target
currentTarget = *i;
EngineMan.upgradeTargetIfNecessary(*i);
const Plugin *metaEnginePlugin = nullptr;
game = EngineMan.findTarget(*i, &metaEnginePlugin);
game = EngineMan.findTarget(*i);
} else if (game = findGameMatchingName(*i), !game.gameId.empty()) {
currentTarget = createTemporaryTarget(game.engineId, game.gameId);
} else {

View File

@ -867,7 +867,7 @@ const Plugin *PluginManager::findEnginePlugin(const Common::String &engineId) {
return nullptr;
}
QualifiedGameDescriptor EngineManager::findTarget(const Common::String &target, const Plugin **plugin) const {
QualifiedGameDescriptor EngineManager::findTarget(const Common::String &target) const {
// Ignore empty targets
if (target.empty())
return QualifiedGameDescriptor();
@ -891,9 +891,6 @@ QualifiedGameDescriptor EngineManager::findTarget(const Common::String &target,
return QualifiedGameDescriptor();
}
if (plugin)
*plugin = foundPlugin;
return QualifiedGameDescriptor(engine.getName(), desc);
}

View File

@ -604,7 +604,7 @@ public:
const PluginList &getPlugins(const PluginType fetchPluginType) const;
/** Find a target. */
QualifiedGameDescriptor findTarget(const Common::String &target, const Plugin **plugin = NULL) const;
QualifiedGameDescriptor findTarget(const Common::String &target) const;
/**
* List games matching the specified criteria.