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;
|
gDebugChannelsOnly = true;
|
||||||
|
|
||||||
|
|
||||||
|
ConfMan.registerDefault("always_run_fallback_detection_extern", true);
|
||||||
PluginManager::instance().init();
|
PluginManager::instance().init();
|
||||||
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager
|
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager
|
||||||
PluginManager::instance().loadDetectionPlugin(); // load detection plugin for uncached 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() {
|
void PluginManagerUncached::init() {
|
||||||
unloadAllPlugins();
|
unloadAllPlugins();
|
||||||
_allEnginePlugins.clear();
|
_allEnginePlugins.clear();
|
||||||
|
ConfMan.setBool("always_run_fallback_detection_extern", false);
|
||||||
|
|
||||||
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); // empty the engine plugins
|
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
|
* 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.
|
* 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());
|
const Plugin *metaEnginePlugin = EngineMan.findPlugin(getEngineId());
|
||||||
|
|
||||||
if (metaEnginePlugin) {
|
if (metaEnginePlugin) {
|
||||||
|
@ -459,7 +467,7 @@ ADDetectedGame SciMetaEngineStatic::fallbackDetect(const FileMap &allFiles, cons
|
||||||
} else {
|
} else {
|
||||||
static bool warn = true;
|
static bool warn = true;
|
||||||
if (warn) {
|
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;
|
warn = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,14 @@ public:
|
||||||
* Fallback detection for Wintermute heavily depends on engine resources, so it's not possible
|
* 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.
|
* 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());
|
const Plugin *metaEnginePlugin = EngineMan.findPlugin(getEngineId());
|
||||||
|
|
||||||
if (metaEnginePlugin) {
|
if (metaEnginePlugin) {
|
||||||
|
@ -103,7 +111,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
static bool warn = true;
|
static bool warn = true;
|
||||||
if (warn) {
|
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;
|
warn = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue