BASE: PLUGINS: Improve fb detection for Sci & Wintermute
This commit is contained in:
parent
e3e8e81815
commit
41af1b63a9
4 changed files with 20 additions and 2 deletions
|
@ -436,6 +436,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
|||
gDebugChannelsOnly = true;
|
||||
|
||||
|
||||
ConfMan.registerDefault("always_run_fallback_detection_extern", true);
|
||||
PluginManager::instance().init();
|
||||
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager
|
||||
PluginManager::instance().loadDetectionPlugin(); // load detection plugin for uncached plugin manager
|
||||
|
|
|
@ -340,6 +340,7 @@ Plugin *PluginManager::getMetaEngineFromEngine(const Plugin *plugin) {
|
|||
void PluginManagerUncached::init() {
|
||||
unloadAllPlugins();
|
||||
_allEnginePlugins.clear();
|
||||
ConfMan.setBool("always_run_fallback_detection_extern", false);
|
||||
|
||||
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); // empty the engine plugins
|
||||
|
||||
|
|
|
@ -450,6 +450,14 @@ ADDetectedGame SciMetaEngineStatic::fallbackDetect(const FileMap &allFiles, cons
|
|||
* Fallback detection for Sci heavily depends on engine resources, so it's not possible
|
||||
* to use them without the engine present in a clean way.
|
||||
*/
|
||||
|
||||
if (ConfMan.hasKey("always_run_fallback_detection_extern")) {
|
||||
if (ConfMan.getBool("always_run_fallback_detection_extern") == false) {
|
||||
warning("SCI: Fallback detection is disabled.");
|
||||
return ADDetectedGame();
|
||||
}
|
||||
}
|
||||
|
||||
const Plugin *metaEnginePlugin = EngineMan.findPlugin(getEngineId());
|
||||
|
||||
if (metaEnginePlugin) {
|
||||
|
@ -459,7 +467,7 @@ ADDetectedGame SciMetaEngineStatic::fallbackDetect(const FileMap &allFiles, cons
|
|||
} else {
|
||||
static bool warn = true;
|
||||
if (warn) {
|
||||
warning("Engine plugin for Sci not found. Some games will fail to be detected until an engine plugin is present.");
|
||||
warning("Engine plugin for Sci not present. Fallback detection is disabled.");
|
||||
warn = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,6 +94,14 @@ public:
|
|||
* Fallback detection for Wintermute heavily depends on engine resources, so it's not possible
|
||||
* to use them without the engine present in a clean way.
|
||||
*/
|
||||
|
||||
if (ConfMan.hasKey("always_run_fallback_detection_extern")) {
|
||||
if (ConfMan.getBool("always_run_fallback_detection_extern") == false) {
|
||||
warning("WINTERMUTE: Fallback detection is disabled.");
|
||||
return ADDetectedGame();
|
||||
}
|
||||
}
|
||||
|
||||
const Plugin *metaEnginePlugin = EngineMan.findPlugin(getEngineId());
|
||||
|
||||
if (metaEnginePlugin) {
|
||||
|
@ -103,7 +111,7 @@ public:
|
|||
} else {
|
||||
static bool warn = true;
|
||||
if (warn) {
|
||||
warning("Engine plugin for Wintermute not found. Some games will fail to be detected until an engine plugin is present.");
|
||||
warning("Engine plugin for Wintermute not present. Fallback detection is disabled.");
|
||||
warn = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue