ENGINES: Change behaviour of EngineMan::getPlugins.

- Changed so we can get any type of plugins.
- This used to always return PLUGIN_TYPE_ENGINE.
- Because now we can differentiate between engines and metaengine, this must be changed.
- For now, return METAENGINE by default
This commit is contained in:
aryanrawlani28 2020-07-29 05:39:24 +05:30 committed by Eugene Sandulenko
parent f07bdb100e
commit 943df64b32
2 changed files with 10 additions and 4 deletions

View file

@ -652,8 +652,8 @@ DetectionResults EngineManager::detectGames(const Common::FSList &fslist) const
return DetectionResults(candidates); return DetectionResults(candidates);
} }
const PluginList &EngineManager::getPlugins() const { const PluginList &EngineManager::getPlugins(const PluginType fetchPluginType) const {
return PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); return PluginManager::instance().getPlugins(fetchPluginType);
} }
namespace { namespace {

View file

@ -416,8 +416,14 @@ public:
/** Find a plugin by its engine ID */ /** Find a plugin by its engine ID */
const Plugin *findPlugin(const Common::String &engineId) const; const Plugin *findPlugin(const Common::String &engineId) const;
/** Get the list of all engine plugins */ /**
const PluginList &getPlugins() const; * Get the list of all plugins for the type specified.
* By default, it will get METAENGINES, for now.
* If usage of actual engines never occurs, we can skip
* the default arguments, and always have it return
* PLUGIN_TYPE_METAENGINE.
*/
const PluginList &getPlugins(const PluginType fetchPluginType = PLUGIN_TYPE_METAENGINE) const;
/** Find a target */ /** Find a target */
QualifiedGameDescriptor findTarget(const Common::String &target, const Plugin **plugin = NULL) const; QualifiedGameDescriptor findTarget(const Common::String &target, const Plugin **plugin = NULL) const;