BASE: Capture all global debug channels as early as possible

This commit is contained in:
Eugene Sandulenko 2021-08-16 21:28:26 +02:00
parent ed09f11eaa
commit fef26b3c59
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -441,6 +441,16 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
gDebugChannelsOnly = true;
// Now we want to enable global flags if any
Common::StringTokenizer tokenizer(specialDebug, " ,");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
if (token.equalsIgnoreCase("all"))
DebugMan.enableAllDebugChannels();
else
DebugMan.enableDebugChannel(token);
}
ConfMan.registerDefault("always_run_fallback_detection_extern", true);
PluginManager::instance().init();
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager