[Scummvm-git-logs] scummvm branch-2-3 -> 44b12eb0c76d1969c7a6f7a606d95f8ad7e71c4d

sev- sev at scummvm.org
Sun Sep 26 11:44:18 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
44b12eb0c7 BASE: Set debug flags before instantiating an engine


Commit: 44b12eb0c76d1969c7a6f7a606d95f8ad7e71c4d
    https://github.com/scummvm/scummvm/commit/44b12eb0c76d1969c7a6f7a606d95f8ad7e71c4d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-09-26T13:44:02+02:00

Commit Message:
BASE: Set debug flags before instantiating an engine

Changed paths:
    base/main.cpp


diff --git a/base/main.cpp b/base/main.cpp
index 0405753303..8163c22990 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -196,6 +196,17 @@ static Common::Error runGame(const Plugin *plugin, const Plugin *enginePlugin, O
 	// before we instantiate the engine, we register debug channels for it
 	DebugMan.addAllDebugChannels(metaEngineDetection.getDebugChannels());
 
+	// On creation the engine should have set up all debug levels so we can use
+	// the command line arguments here
+	Common::StringTokenizer tokenizer(debugLevels, " ,");
+	while (!tokenizer.empty()) {
+		Common::String token = tokenizer.nextToken();
+		if (token.equalsIgnoreCase("all"))
+			DebugMan.enableAllDebugChannels();
+		else if (!DebugMan.enableDebugChannel(token))
+			warning("Engine does not support debug level '%s'", token.c_str());
+	}
+
 	// Create the game's MetaEngine.
 	MetaEngine &metaEngine = enginePlugin->get<MetaEngine>();
 	err = metaEngine.createInstance(&system, &engine);
@@ -267,17 +278,6 @@ static Common::Error runGame(const Plugin *plugin, const Plugin *enginePlugin, O
 		}
 	}
 
-	// On creation the engine should have set up all debug levels so we can use
-	// the command line arguments here
-	Common::StringTokenizer tokenizer(debugLevels, " ,");
-	while (!tokenizer.empty()) {
-		Common::String token = tokenizer.nextToken();
-		if (token.equalsIgnoreCase("all"))
-			DebugMan.enableAllDebugChannels();
-		else if (!DebugMan.enableDebugChannel(token))
-			warning("Engine does not support debug level '%s'", token.c_str());
-	}
-
 #ifdef USE_TRANSLATION
 	Common::String previousLanguage = TransMan.getCurrentLanguage();
 	if (ConfMan.hasKey("gui_use_game_language")




More information about the Scummvm-git-logs mailing list