mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 04:40:39 +00:00
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:
parent
a92dab8a8c
commit
07daa6c225
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user