[Scummvm-git-logs] scummvm master -> 927b9af1c9e5173ac639524e3915517c2b86f980

sev- sev at scummvm.org
Sun Sep 26 11:44:17 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:
927b9af1c9 BASE: Set debug flags before instantiating an engine


Commit: 927b9af1c9e5173ac639524e3915517c2b86f980
    https://github.com/scummvm/scummvm/commit/927b9af1c9e5173ac639524e3915517c2b86f980
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-09-26T13:43:23+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 e102686451..bf44a08356 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>();
 	if (err.getCode() == Common::kNoError) {
@@ -274,17 +285,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