[Scummvm-git-logs] scummvm master -> dc2a5624c06c2a8d7e7ccca4db75c63764b78b72

sev- noreply at scummvm.org
Mon Aug 21 13:40:30 UTC 2023


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

Summary:
28401ee7c0 BASE: Export header in dumpAllDetectionEntries()
ad8be9d8d5 BASE: Add quotes to metadata while exporting
dc2a5624c0 BASE: Dump engine desc in detection entry metadata


Commit: 28401ee7c039b794ef3d16857e8d41cbafe89708
    https://github.com/scummvm/scummvm/commit/28401ee7c039b794ef3d16857e8d41cbafe89708
Author: Abhinav Chennubhotla (51199011+PhoenixFlame101 at users.noreply.github.com)
Date: 2023-08-21T15:40:25+02:00

Commit Message:
BASE: Export header in dumpAllDetectionEntries()

Changed paths:
    base/commandLine.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 83a51829147..d3a1e9b4479 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -1426,6 +1426,12 @@ static void listAudioDevices() {
 /** Dump MD5s from detection entries into STDOUT */
 static void dumpAllDetectionEntries() {
 	const PluginList &plugins = EngineMan.getPlugins();
+
+	printf("scummvm (\n");
+	printf("\tauthor scummvm\n");
+	printf("\tversion %s\n", gScummVMVersion);
+	printf(")\n\n");
+
 	for (PluginList::const_iterator iter = plugins.begin(); iter != plugins.end(); iter++) {
 		const MetaEngineDetection &metaEngine = (*iter)->get<MetaEngineDetection>();
 		metaEngine.dumpDetectionEntries();


Commit: ad8be9d8d5779cc798cfbb86f6882efe853cef39
    https://github.com/scummvm/scummvm/commit/ad8be9d8d5779cc798cfbb86f6882efe853cef39
Author: Abhinav Chennubhotla (51199011+PhoenixFlame101 at users.noreply.github.com)
Date: 2023-08-21T15:40:25+02:00

Commit Message:
BASE: Add quotes to metadata while exporting

Changed paths:
    base/commandLine.cpp
    engines/advancedDetector.cpp


diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index d3a1e9b4479..c4b4d005611 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -1428,8 +1428,8 @@ static void dumpAllDetectionEntries() {
 	const PluginList &plugins = EngineMan.getPlugins();
 
 	printf("scummvm (\n");
-	printf("\tauthor scummvm\n");
-	printf("\tversion %s\n", gScummVMVersion);
+	printf("\tauthor \"scummvm\"\n");
+	printf("\tversion \"%s\"\n", gScummVMVersion);
 	printf(")\n\n");
 
 	for (PluginList::const_iterator iter = plugins.begin(); iter != plugins.end(); iter++) {
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 2a542e81781..3e382ded974 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -655,8 +655,8 @@ static bool getFilePropertiesIntern(uint md5Bytes, const AdvancedMetaEngine::Fil
 
 // Add backslash before double quotes (") and backslashes themselves (\)
 Common::String escapeString(const char *string) {
-	if (string == nullptr || Common::String(string) == "")
-		return "NULL";
+	if (string == nullptr)
+		return "";
 
 	Common::String res = "";
 
@@ -678,12 +678,12 @@ void AdvancedMetaEngineDetection::dumpDetectionEntries() const {
 		const char *title = ((const PlainGameDescriptor *)_gameIds)->description;
 
 		printf("game (\n");
-		printf("\tname %s\n", escapeString(g->gameId).c_str());
-		printf("\ttitle %s\n", escapeString(title).c_str());
-		printf("\textra %s\n", escapeString(g->extra).c_str());
-		printf("\tlanguage %s\n", escapeString(getLanguageLocale(g->language)).c_str());
-		printf("\tplatform %s\n", escapeString(getPlatformCode(g->platform)).c_str());
-		printf("\tsourcefile %s\n", escapeString(getName()).c_str());
+		printf("\tname \"%s\"\n", escapeString(g->gameId).c_str());
+		printf("\ttitle \"%s\"\n", escapeString(title).c_str());
+		printf("\textra \"%s\"\n", escapeString(g->extra).c_str());
+		printf("\tlanguage \"%s\"\n", escapeString(getLanguageLocale(g->language)).c_str());
+		printf("\tplatform \"%s\"\n", escapeString(getPlatformCode(g->platform)).c_str());
+		printf("\tsourcefile \"%s\"\n", escapeString(getName()).c_str());
 
 		for (auto fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
 			const char *fname = fileDesc->fileName;
@@ -693,7 +693,7 @@ void AdvancedMetaEngineDetection::dumpDetectionEntries() const {
 			Common::String md5Prefix = md5PropToGameFile(md5prop);
 			Common::String key = md5;
 			if (md5Prefix != "" && md5.find(':') == Common::String::npos)
-				key = md5Prefix + md5;
+				key = md5Prefix + ':' + md5;
 
 			printf("\trom ( name \"%s\" size %lld md5-%d %s )\n", escapeString(fname).c_str(), static_cast<long long int>(fsize), _md5Bytes, key.c_str());
 		}


Commit: dc2a5624c06c2a8d7e7ccca4db75c63764b78b72
    https://github.com/scummvm/scummvm/commit/dc2a5624c06c2a8d7e7ccca4db75c63764b78b72
Author: Abhinav Chennubhotla (51199011+PhoenixFlame101 at users.noreply.github.com)
Date: 2023-08-21T15:40:25+02:00

Commit Message:
BASE: Dump engine desc in detection entry metadata

Changed paths:
    engines/advancedDetector.cpp


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 3e382ded974..3febae9cb3a 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -675,7 +675,10 @@ void AdvancedMetaEngineDetection::dumpDetectionEntries() const {
 
 	for (descPtr = _gameDescriptors; ((const ADGameDescription *)descPtr)->gameId != nullptr; descPtr += _descItemSize) {
 		auto g = ((const ADGameDescription *)descPtr);
-		const char *title = ((const PlainGameDescriptor *)_gameIds)->description;
+		const PlainGameDescriptor *gameDesc = findPlainGameDescriptor(g->gameId, _gameIds);
+		const char *title = "";
+		if (gameDesc != 0)
+			title = gameDesc->description;
 
 		printf("game (\n");
 		printf("\tname \"%s\"\n", escapeString(g->gameId).c_str());
@@ -684,6 +687,7 @@ void AdvancedMetaEngineDetection::dumpDetectionEntries() const {
 		printf("\tlanguage \"%s\"\n", escapeString(getLanguageLocale(g->language)).c_str());
 		printf("\tplatform \"%s\"\n", escapeString(getPlatformCode(g->platform)).c_str());
 		printf("\tsourcefile \"%s\"\n", escapeString(getName()).c_str());
+		printf("\tengine \"%s\"\n", escapeString(getEngineName()).c_str());
 
 		for (auto fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) {
 			const char *fname = fileDesc->fileName;




More information about the Scummvm-git-logs mailing list