[Scummvm-git-logs] scummvm master -> 37a181f3db44ab51446f421144a03d7f48364ca9

sev- sev at scummvm.org
Sun Jun 13 12:15:54 UTC 2021


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

Summary:
55d1fd2042 DIRECTOR: add custom targets detect to director
e1d047ca88 DIRECTOR: add comments for detect custom targets in director
ada288626d DIRECTOR: change customTargetList to hashmap
5ff5787cbf DIRECTOR: fix incorrect code of detection in director
7af3a3f84c ENGINES: introduce ADDectedGameExtraInfo to ADGameDetector, add extra info as parameter for fallback detect.
8abdcf6600 ENGINES: dealing with ADDetectedGameExtraInfo after we using fallback detection
6e3551049c DIRECTOR: pass extra info in fallback detection
65f36c33ff ENGINES: extend toDetectedGames to deal with ADDetectedGameExtraInfo.
073db5b715 DIRECTOR: resolve conflicts and remove warnings
5c08d58f70 ENGINES: resolve compile errors
37a181f3db DIRECTOR: fix indent problem, and for custom target file name, we won't save it since we didn't use it.


Commit: 55d1fd20421898e3b1535b463edcaee0f891c6b8
    https://github.com/scummvm/scummvm/commit/55d1fd20421898e3b1535b463edcaee0f891c6b8
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: add custom targets detect to director

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index b13475e443..0028938ff9 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -29,6 +29,155 @@
 #include "director/detection.h"
 #include "director/director.h"
 
+static const PlainGameDescriptor directorGames[] = {
+	{ "director",			"Macromedia Director Game" },
+	{ "directortest",		"Macromedia Director Test Target" },
+	{ "directortest-all",	"Macromedia Director All Movies Test Target" },
+	{ "theapartment",		"The Apartment, Interactive demo" },
+
+	{ "9worlds",			"Nine Worlds hosted by Patrick Stewart"},
+	{ "alexworld",			"ALeX-WORLD"},
+	{ "alice",				"Alice: An Interactive Museum"},
+	{ "amandastories",		"AmandaStories"},
+	{ "amber",				"AMBER: Journeys Beyond"},
+	{ "ankh1",				"Ankh: Mystery of the Pyramids"},
+	{ "ankh2",				"Ankh 2: Mystery of Tutankhamen"},
+	{ "ankh3",				"Ankh 3"},
+	{ "arcofdoom",			"Arc of Doom"},
+	{ "artrageous",			"ArtRageous!"},
+	{ "asimovrat",			"Robotoid Assembly Toolkit"},
+	{ "ataripack",			"Activision's Atari 2600 Action Pack"},
+	{ "badday",				"Bad Day on the Midway"},
+	{ "beyondthewall",		"Beyond the Wall of Stars"},
+	{ "bookshelf94",		"Microsoft Bookshelf '94"},
+	{ "bowie",				"JUMP: The David Bowie Interactive CD-ROM"},
+	{ "bpmc",				"Byron Preiss Multimedia Catalog"},
+	{ "chaos",				"The C.H.A.O.S. Continuum"},
+	{ "chopsuey",   		"Chop Suey" },
+	{ "chuteng",   			"Chu-Teng" },
+	{ "daedalus",			"The Daedalus Encounter"},
+	{ "darkeye",			"The Dark Eye"},
+	{ "derratsorcerum",		"Derrat Sorcerum"},
+	{ "devo",				"DEVO Presents: Adventures of the Smart Patrol"},
+	{ "earthtia",			"Earthtia Saga: Larthur's Legend"},
+	{ "easternmind",		"Eastern Mind: The Lost Souls of Tong Nou"},
+	{ "earthwormjim",		"Earthworm Jim"},
+	{ "einstein",			"The Ultimate Einstein"},
+	{ "encarta94",			"Microsoft Encarta '94"},
+	{ "encarta95",			"Microsoft Encarta '95"},
+	{ "ernie",				"Ernie"},
+	{ "flw",				"The Ultimate Frank Lloyd Wright: America's Architect"},
+	{ "frankenstein",		"Frankenstein: Through the Eyes of the Monster"},
+	{ "freakshow",			"Freak Show"},
+	{ "gadget",				"Gadget: Invention, Travel, & Adventure"},
+	{ "gundam0079",			"Gundam 0079: The War for Earth" },
+	{ "hamsterland1",		"Busy People of Hamsterland" },
+	{ "hamsterland2",		"Hamsterland: The Time Machine" },
+	{ "hhouse",				"Gahan Wilson's The Ultimate Haunted House" },
+	{ "horrortour1",		"Zeddas: Servant of Sheol"},
+	{ "horrortour2",		"Zeddas: Horror Tour 2"},
+	{ "horrortour3",		"Labyrinthe"},
+	{ "hyperblade",			"HyperBlade" },
+	{ "id4p1",     			"iD4 Mission Disk 1 - Alien Supreme Commander" },
+	{ "id4p2",      		"iD4 Mission Disk 2 - Alien Science Officer" },
+	{ "id4p3",      		"iD4 Mission Disk 3 - Warrior Alien" },
+	{ "id4p4",      		"iD4 Mission Disk 4 - Alien Navigator" },
+	{ "id4p5",      		"iD4 Mission Disk 5 - Captain Steve Hiller" },
+	{ "id4p6",      		"iD4 Mission Disk 6 - Dave's Computer" },
+	{ "id4p7",      		"iD4 Mission Disk 7 - President Whitmore" },
+	{ "id4p8",      		"iD4 Mission Disk 8 - Alien Attack Fighter" },
+	{ "id4p9",      		"iD4 Mission Disk 9 - FA-18 Fighter Jet" },
+	{ "id4p10",     		"iD4 Mission Disk 10 - Alien Bomber" },
+	{ "id4p11",     		"iD4 Mission Disk 11 - Area 51" },
+	{ "improv",     		"Don't Quit Your Day Job" },
+	{ "ironhelix",			"Iron Helix" },
+	{ "isis",				"Isis"},
+	{ "jewels",				"Jewels of the Oracle" },
+	{ "jman",				"The Journeyman Project" },
+	{ "jman2",				"The Journeyman Project 2: Buried in Time" },
+	{ "jmmd",       		"Just Me & My Dad" },
+	{ "karma",				"Karma: Curse of the 12 Caves" },
+	{ "kyoto",				"Cosmology of Kyoto" },
+	{ "lion",				"Lion" },
+	{ "louiscatorze",		"Louis Cat Orze: The Mystery of the Queen's Necklace" },
+	{ "lzone",				"L-ZONE"},
+	{ "madmac",				"Mad Mac Cartoons"},
+	{ "majestic",			"Majestic Part I: Alien Encounter" },
+	{ "martian",			"Ray Bradbury's The Martian Chronicles Adventure Game" },
+	{ "maze",				"The Riddle of the Maze"},
+	{ "mechwarrior2",		"MechWarrior 2" },
+	{ "mediaband",			"Meet Mediaband" },
+	{ "melements",			"Masters of the Elements" },
+	{ "mirage",				"Mirage" },
+	{ "mummy",				"Mummy: Tomb of the Pharaoh"},
+	{ "muppets",			"Muppet Treasure Island" },
+	{ "murderbrett",		"Who Killed Brett Penance?"},
+	{ "murdermagic",		"The Magic Death"},
+	{ "murdersam",			"Who Killed Sam Rupert?"},
+	{ "murdertaylor",		"Who Killed Taylor French? The Case of the Undressed Reporter"},
+	{ "mylk",				"Mylk"},
+	{ "mysteriousegypt",	"Mysterious Egypt"},
+	{ "necrobius",			"Necrobius"},
+	{ "nile",				"Nile: Passage to Egypt"},
+	{ "noir",				"Noir: A Shadowy Thriller"},
+	{ "operafatal",			"Opera Fatal"},
+	{ "paws",				"P.A.W.S.: Personal Automated Wagging System"},
+	{ "phantasplanet",		"Phantasmagoria Amusement Planet"},
+	{ "pitfall",			"Pitfall: The Mayan Adventure" },
+	{ "planetarizona",		"Escape from Planet Arizona" },
+	{ "prescue",			"Paradise Rescue" },
+	{ "refixion1",			"Refixion"},
+	{ "refixion2",			"Refixion II: Museum or Hospital"},
+	{ "refixion3",			"Refixion III: The Reindeer Story"},
+	{ "rodney",				"Rodney's Funscreen"},
+	{ "saillusion",     	"Scientific American Library: Illusion" },
+	{ "sakin2",				"Sakin II"},
+	{ "santafe1",			"Santa Fe Mysteries: The Elk Moon Murder"},
+	{ "sauniverse",     	"Scientific American Library: The Universe" },
+	{ "sciencesmart",		"Science Smart"},
+	{ "screamingmetal",		"Screaming Metal"},
+	{ "shanghai",			"Shanghai: Great Moments"},
+	{ "simpsons",			"The Simpsons: Cartoon Studio"},
+	{ "skyborg",			"SkyBorg: Into the Vortex"},
+	{ "snh",				"A Silly Noisy House"},
+	{ "splayer",			"The Simpsons: Cartoon Studio Player"},
+	{ "spyclub",			"Spy Club" },
+	{ "spycraft",			"Spycraft: The Great Game" },
+	{ "staytooned",			"Stay Tooned!" },
+	{ "superspy",			"SuperSpy 1" },
+	{ "teamxtreme1",		"Operation: Weather Disaster" },
+	{ "teamxtreme2",		"Operation: Eco-Nightmare" },
+	{ "teddybear",			"Operation Teddy Bear" },
+	{ "the7colors",			"The Seven Colors: Legend of PSY-S City"},
+	{ "totaldistortion",	"Total Distortion"},
+	{ "trekborg",			"Star Trek: Borg"},
+	{ "trekguideds9",		"Star Trek: Deep Space Nine Episode Guide"},
+	{ "trekguidetng",		"Star Trek: The Next Generation Episode Guide"},
+	{ "trekklingon",		"Star Trek: Klingon"},
+	{ "trekomni",			"Star Trek Omnipedia"},
+	{ "trekpedia98",		"Star Trek Encyclopedia 1998"},
+	{ "trektech",			"Star Trek: The Next Generation Interactive Technical Manual"},
+	{ "tri3dtrial",			"Tri-3D-Trial"},
+	{ "twistynight1",		"Twisty Night #1"},
+	{ "twistynight2",		"Twisty Night #2"},
+	{ "twistynight3",		"Twisty Night #3"},
+	{ "ushistory",			"The History of the United States for Young People"},
+	{ "vvcyber",			"Victor Vector & Yondo: The Cyberplasm Formula"},
+	{ "vvdinosaur",			"Victor Vector & Yondo: The Last Dinosaur Egg"},
+	{ "vvharp",				"Victor Vector & Yondo: The Hypnotic Harp"},
+	{ "vvvampire",			"Victor Vector & Yondo: The Vampire's Coffin"},
+	{ "warlock", 			"Spaceship Warlock"},
+	{ "wishbone", 			"Wishbone and the Amazing Odyssey"},
+	{ "wrath",				"Wrath of the Gods"},
+	{ "xanthus",			"Xanthus"},
+	{ "xfua",				"The X-Files Unrestricted Access"},
+	{ "ybr1",				"Yellow Brick Road"},
+	{ "ybr2",				"Yellow Brick Road II"},
+	{ "ybr3",				"Yellow Brick Road III"},
+	{ "znemesis",			"Zork Nemesis: The Forbidden Lands"},
+	{ 0, 0 }
+};
+
 #include "director/detection_tables.h"
 
 namespace Director {
@@ -115,7 +264,6 @@ const char *directoryGlobs[] = {
 	"technik",						// Glasklar Technology Interactive
 	0
 };
-}
 
 static const DebugChannelDef debugFlagList[] = {
 	{Director::kDebugCompile, "compile", "Lingo Compilation"},
@@ -202,6 +350,28 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 
 		Common::String fileName = file->getName();
 		fileName.toLowercase();
+		if (findCustomTarget(fileName)) {
+			Common::File f;
+			if (!f.open(*file))
+				continue;
+			Common::String targetID = f.readString('\n');
+			Common::String gameName = f.readString('\n');
+			Common::String platform = f.readString('\n');
+			Common::String version = f.readString('\n');
+
+			strncpy(s_fallbackFileNameBuffer, fileName.c_str(), 50);
+			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
+			strncpy(s_fallbackGameIDBuffer, targetID.c_str(), 20);
+			desc->desc.gameId = s_fallbackGameIDBuffer;
+			desc->version = atoi(version.c_str());
+			desc->desc.platform = Common::parsePlatform(platform);
+			Common::strlcpy(s_fallbackExtraBuf, gameName.c_str(), sizeof(s_fallbackExtraBuf) - 1);
+			desc->desc.extra = s_fallbackExtraBuf;
+
+			ADDetectedGame game(&desc->desc);
+			return game;
+		}
+
 		if (!fileName.hasSuffix(".exe"))
 			continue;
 


Commit: e1d047ca884ca70326866013fa4f4817e2623d8e
    https://github.com/scummvm/scummvm/commit/e1d047ca884ca70326866013fa4f4817e2623d8e
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: add comments for detect custom targets in director

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index 0028938ff9..fe93d51af2 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -350,6 +350,9 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 
 		Common::String fileName = file->getName();
 		fileName.toLowercase();
+
+		// first we check the custom target, check whether the filename is in the list of custom target
+		// then we read 4 string from it, targetID, gameName, platform and version
 		if (findCustomTarget(fileName)) {
 			Common::File f;
 			if (!f.open(*file))


Commit: ada288626de222a0290c11a75b585f5a80ee3b00
    https://github.com/scummvm/scummvm/commit/ada288626de222a0290c11a75b585f5a80ee3b00
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: change customTargetList to hashmap

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index fe93d51af2..dfcabc863e 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -33,6 +33,7 @@ static const PlainGameDescriptor directorGames[] = {
 	{ "director",			"Macromedia Director Game" },
 	{ "directortest",		"Macromedia Director Test Target" },
 	{ "directortest-all",	"Macromedia Director All Movies Test Target" },
+	{ "workshop",			"Director Workshop Movies"},
 	{ "theapartment",		"The Apartment, Interactive demo" },
 
 	{ "9worlds",			"Nine Worlds hosted by Patrick Stewart"},
@@ -265,6 +266,15 @@ const char *directoryGlobs[] = {
 	0
 };
 
+static const char *customTargetList[] = {
+	"d2-mac",
+	"d3-mac",
+	"d4-mac",
+	"d3-win",
+	"d4-win",
+	0
+};
+
 static const DebugChannelDef debugFlagList[] = {
 	{Director::kDebugCompile, "compile", "Lingo Compilation"},
 	{Director::kDebugCompileOnly, "compileonly", "Skip Lingo code execution"},
@@ -287,10 +297,19 @@ static const DebugChannelDef debugFlagList[] = {
 };
 
 class DirectorMetaEngineDetection : public AdvancedMetaEngineDetection {
+private:
+	Common::HashMap<Common::String, bool, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _customTarget;
+
 public:
 	DirectorMetaEngineDetection() : AdvancedMetaEngineDetection(Director::gameDescriptions, sizeof(Director::DirectorGameDescription), directorGames) {
 		_maxScanDepth = 5;
 		_directoryGlobs = Director::directoryGlobs;
+		_maxScanDepth = 2;
+		_directoryGlobs = directoryGlobs;
+
+		// initialize customTarget hashmap here
+		for (int i = 0; customTargetList[i] != NULL; i++)
+			_customTarget[customTargetList[i]] = true;
 	}
 
 	const char *getEngineId() const override {
@@ -353,7 +372,7 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 
 		// first we check the custom target, check whether the filename is in the list of custom target
 		// then we read 4 string from it, targetID, gameName, platform and version
-		if (findCustomTarget(fileName)) {
+		if (_customTarget.contains(fileName)) {
 			Common::File f;
 			if (!f.open(*file))
 				continue;
@@ -362,9 +381,9 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 			Common::String platform = f.readString('\n');
 			Common::String version = f.readString('\n');
 
-			strncpy(s_fallbackFileNameBuffer, fileName.c_str(), 50);
+			strncpy(s_fallbackFileNameBuffer, fileName.c_str(), sizeof(s_fallbackFileNameBuffer) - 1);
 			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
-			strncpy(s_fallbackGameIDBuffer, targetID.c_str(), 20);
+			strncpy(s_fallbackGameIDBuffer, targetID.c_str(), sizeof(s_fallbackGameIDBuffer) - 1);
 			desc->desc.gameId = s_fallbackGameIDBuffer;
 			desc->version = atoi(version.c_str());
 			desc->desc.platform = Common::parsePlatform(platform);


Commit: 5ff5787cbfed89a0731a82bf8ab7a6a37ced2d46
    https://github.com/scummvm/scummvm/commit/5ff5787cbfed89a0731a82bf8ab7a6a37ced2d46
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: fix incorrect code of detection in director

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index dfcabc863e..4e04d75538 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -33,7 +33,6 @@ static const PlainGameDescriptor directorGames[] = {
 	{ "director",			"Macromedia Director Game" },
 	{ "directortest",		"Macromedia Director Test Target" },
 	{ "directortest-all",	"Macromedia Director All Movies Test Target" },
-	{ "workshop",			"Director Workshop Movies"},
 	{ "theapartment",		"The Apartment, Interactive demo" },
 
 	{ "9worlds",			"Nine Worlds hosted by Patrick Stewart"},
@@ -272,6 +271,7 @@ static const char *customTargetList[] = {
 	"d4-mac",
 	"d3-win",
 	"d4-win",
+	"director-movie",
 	0
 };
 
@@ -383,8 +383,6 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 
 			strncpy(s_fallbackFileNameBuffer, fileName.c_str(), sizeof(s_fallbackFileNameBuffer) - 1);
 			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
-			strncpy(s_fallbackGameIDBuffer, targetID.c_str(), sizeof(s_fallbackGameIDBuffer) - 1);
-			desc->desc.gameId = s_fallbackGameIDBuffer;
 			desc->version = atoi(version.c_str());
 			desc->desc.platform = Common::parsePlatform(platform);
 			Common::strlcpy(s_fallbackExtraBuf, gameName.c_str(), sizeof(s_fallbackExtraBuf) - 1);


Commit: 7af3a3f84c6c53e8bbb01ea6992431863ee64f17
    https://github.com/scummvm/scummvm/commit/7af3a3f84c6c53e8bbb01ea6992431863ee64f17
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
ENGINES: introduce ADDectedGameExtraInfo to ADGameDetector, add extra info as parameter for fallback detect.

Changed paths:
    engines/advancedDetector.h
    engines/agi/detection.cpp
    engines/ags/detection.cpp
    engines/ags/detection.h
    engines/asylum/detection.cpp
    engines/cge/detection.cpp
    engines/cge2/detection.cpp
    engines/cryomni3d/detection.cpp
    engines/director/detection.cpp
    engines/gob/detection/detection.cpp
    engines/made/detection.cpp
    engines/mohawk/detection.cpp
    engines/queen/detection.cpp
    engines/sci/detection.cpp
    engines/sludge/detection.cpp
    engines/tinsel/detection.cpp
    engines/toon/detection.cpp
    engines/touche/detection.cpp
    engines/tucker/detection.cpp
    engines/wintermute/detection.cpp


diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index cb008b1b35..dff8f9474f 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -160,6 +160,14 @@ struct ADGameDescription {
 	const char *guiOptions;
 };
 
+/**
+ * struct which saved extra information for detected games
+ */
+struct ADDetectedGameExtraInfo {
+	const char *gameName;			/*!< Extra info which saved game name */
+	const char *targetID;			/*!< targetID which will be used on preferred target id */
+};
+
 /**
  * A game installation matching an AD game description.
  */
@@ -378,7 +386,7 @@ protected:
 	 * An (optional) generic fallback detection function that is invoked
 	 * if the regular MD5-based detection failed to detect anything.
 	 */
-	virtual ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+	virtual ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra = nullptr) const {
 		return ADDetectedGame();
 	}
 
@@ -489,7 +497,7 @@ public:
 	 *
 	 * An example of how this is implemented can be found in the Wintermute Engine.
 	 */
-	virtual ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist) const {
+	virtual ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra = nullptr) const {
 		return ADDetectedGame();
 	}
 
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 57efd76ea5..bfff6b6fd2 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -171,10 +171,10 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
-ADDetectedGame AgiMetaEngineDetection::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const {
+ADDetectedGame AgiMetaEngineDetection::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	typedef Common::HashMap<Common::String, int32> IntMap;
 	IntMap allFiles;
 	bool matchedUsingFilenames = false;
diff --git a/engines/ags/detection.cpp b/engines/ags/detection.cpp
index 3a2a4e432a..9896dd9e86 100644
--- a/engines/ags/detection.cpp
+++ b/engines/ags/detection.cpp
@@ -224,7 +224,7 @@ DetectedGames AGSMetaEngineDetection::detectGames(const Common::FSList &fslist)
 	return detectedGames;
 }
 
-ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	// Set the default values for the fallback descriptor's ADGameDescription part.
 	AGS::g_fallbackDesc.desc.language = Common::UNK_LANG;
 	AGS::g_fallbackDesc.desc.platform = Common::kPlatformUnknown;
diff --git a/engines/ags/detection.h b/engines/ags/detection.h
index 95eb401259..2ea43c46bf 100644
--- a/engines/ags/detection.h
+++ b/engines/ags/detection.h
@@ -85,7 +85,7 @@ public:
 
 	DetectedGames detectGames(const Common::FSList &fslist) const override;
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra = nullptr) const override;
 
 	bool canPlayUnknownVariants() const override {
 		return true;
diff --git a/engines/asylum/detection.cpp b/engines/asylum/detection.cpp
index d40e89624e..5bf2603430 100644
--- a/engines/asylum/detection.cpp
+++ b/engines/asylum/detection.cpp
@@ -52,7 +52,7 @@ public:
 		_directoryGlobs = Asylum::directoryGlobs;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		return detectGameFilebased(allFiles, Asylum::fileBasedFallback);
 	}
 
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 54f574c041..d7ece80907 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -135,7 +135,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
 static ADGameDescription s_fallbackDesc = {
@@ -153,7 +153,7 @@ static const ADFileBasedFallback fileBasedFallback[] = {
 	{ 0, { 0 } }
 };
 
-ADDetectedGame CGEMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame CGEMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	ADDetectedGame game = detectGameFilebased(allFiles, CGE::fileBasedFallback);
 
 	if (!game.desc)
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp
index b369e0d0c0..f5c8c7cb79 100644
--- a/engines/cge2/detection.cpp
+++ b/engines/cge2/detection.cpp
@@ -125,7 +125,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
 static ADGameDescription s_fallbackDesc = {
@@ -145,7 +145,7 @@ static const ADFileBasedFallback fileBasedFallback[] = {
 
 // This fallback detection looks identical to the one used for CGE. In fact, the difference resides
 // in the ResourceManager which handles a different archive format. The rest of the detection is identical.
-ADDetectedGame CGE2MetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame CGE2MetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	ADDetectedGame game = detectGameFilebased(allFiles, CGE2::fileBasedFallback);
 
 	if (!game.desc)
diff --git a/engines/cryomni3d/detection.cpp b/engines/cryomni3d/detection.cpp
index 477484609a..bfd27ee0d6 100644
--- a/engines/cryomni3d/detection.cpp
+++ b/engines/cryomni3d/detection.cpp
@@ -63,7 +63,7 @@ public:
 	}
 
 	ADDetectedGame fallbackDetect(const FileMap &allFiles,
-								  const Common::FSList &fslist) const override {
+								  const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		return detectGameFilebased(allFiles, fileBased);
 	}
 
diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index 4e04d75538..e7112e68c4 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -328,7 +328,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
 static Director::DirectorGameDescription s_fallbackDesc = {
@@ -348,7 +348,7 @@ static Director::DirectorGameDescription s_fallbackDesc = {
 static char s_fallbackFileNameBuffer[51];
 static char s_fallbackExtraBuf[256];
 
-ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	// TODO: Handle Mac fallback
 
 	// reset fallback description
diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp
index 0c8b422fd3..46da262b5c 100644
--- a/engines/gob/detection/detection.cpp
+++ b/engines/gob/detection/detection.cpp
@@ -59,7 +59,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 
 private:
 	/**
@@ -74,7 +74,7 @@ GobMetaEngineDetection::GobMetaEngineDetection() :
 	_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
 }
 
-ADDetectedGame GobMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame GobMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	ADDetectedGame detectedGame = detectGameFilebased(allFiles, Gob::fileBased);
 	if (!detectedGame.desc) {
 		return ADDetectedGame();
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index b0e403c178..95fe8e011b 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -52,10 +52,10 @@ public:
 		return "MADE Engine (C) Activision";
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
-ADDetectedGame MadeMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame MadeMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	// Set the default values for the fallback descriptor's ADGameDescription part.
 	Made::g_fallbackDesc.desc.language = Common::UNK_LANG;
 	Made::g_fallbackDesc.desc.platform = Common::kPlatformDOS;
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index e262153fed..7caac7f11b 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -86,7 +86,7 @@ public:
 		_directoryGlobs = directoryGlobs;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		return detectGameFilebased(allFiles, Mohawk::fileBased);
 	}
 
diff --git a/engines/queen/detection.cpp b/engines/queen/detection.cpp
index 52ef652fec..5718362c9f 100644
--- a/engines/queen/detection.cpp
+++ b/engines/queen/detection.cpp
@@ -496,10 +496,10 @@ public:
 		return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis";
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
-ADDetectedGame QueenMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame QueenMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	static ADGameDescription desc;
 
 	// Iterate over all files in the given directory
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 5a09727708..365164d2db 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -487,7 +487,7 @@ public:
 		return "Sierra's Creative Interpreter (C) Sierra Online";
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 	void registerDefaultSettings(const Common::String &target) const override;
 	GUI::OptionsContainerWidget *buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
 };
@@ -503,7 +503,7 @@ GUI::OptionsContainerWidget *SciMetaEngineDetection::buildEngineOptionsWidgetSta
 	return new OptionsWidget(boss, name, target);
 }
 
-ADDetectedGame SciMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame SciMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	/**
 	 * 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.
diff --git a/engines/sludge/detection.cpp b/engines/sludge/detection.cpp
index 5c99a96e87..d246f4f335 100644
--- a/engines/sludge/detection.cpp
+++ b/engines/sludge/detection.cpp
@@ -98,10 +98,10 @@ public:
 	}
 
 	// for fall back detection
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
-ADDetectedGame SludgeMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame SludgeMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	// reset fallback description
 	s_fallbackDesc.desc.gameId = "sludge";
 	s_fallbackDesc.desc.extra = "";
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 4284eefdf2..e42e8291ca 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -67,7 +67,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extraInfo) const override;
 };
 
 struct SizeMD5 {
@@ -82,7 +82,7 @@ typedef Common::Array<const ADGameDescription *> ADGameDescList;
  * Fallback detection scans the list of Discworld 2 targets to see if it can detect an installation
  * where the files haven't been renamed (i.e. don't have the '1' just before the extension)
  */
-ADDetectedGame TinselMetaEngineDetection::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist) const {
+ADDetectedGame TinselMetaEngineDetection::fallbackDetect(const FileMap &allFilesXXX, const Common::FSList &fslist, ADDetectedGameExtraInfo **extraInfo) const {
 	Common::String extra;
 	FileMap allFiles;
 	SizeMD5Map filesSizeMD5;
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp
index 880db46248..ce3b0e2721 100644
--- a/engines/toon/detection.cpp
+++ b/engines/toon/detection.cpp
@@ -154,7 +154,7 @@ public:
 		_directoryGlobs = directoryGlobs;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		return detectGameFilebased(allFiles, Toon::fileBasedFallback);
 	}
 
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index e793518a7b..880619e7a3 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -138,7 +138,7 @@ public:
 		_directoryGlobs = directoryGlobs;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		return detectGameFilebased(allFiles, Touche::fileBasedFallback);
 	}
 
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index ac28d72cee..4fed10d606 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -134,7 +134,7 @@ public:
 		return "Bud Tucker in Double Trouble (C) Merit Studios";
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		for (Common::FSList::const_iterator d = fslist.begin(); d != fslist.end(); ++d) {
 			Common::FSList audiofslist;
 			if (d->isDirectory() && d->getName().equalsIgnoreCase("audio") && d->getChildren(audiofslist, Common::FSNode::kListFilesOnly)) {
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 321fd40d4c..86b302cf61 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -104,7 +104,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override {
 		/**
 		 * 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.


Commit: 8abdcf66003d5d6702462f637b19fb5c831dd9be
    https://github.com/scummvm/scummvm/commit/8abdcf66003d5d6702462f637b19fb5c831dd9be
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
ENGINES: dealing with ADDetectedGameExtraInfo after we using fallback detection

Changed paths:
    engines/advancedDetector.cpp
    engines/advancedDetector.h


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 80e9b23406..e7391c3345 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -255,12 +255,26 @@ DetectedGames AdvancedMetaEngineDetection::detectGames(const Common::FSList &fsl
 
 	if (!foundKnownGames) {
 		// Use fallback detector if there were no matches by other means
-		ADDetectedGame fallbackDetectionResult = fallbackDetect(allFiles, fslist);
+		ADDetectedGameExtraInfo *extraInfo = nullptr;
+		ADDetectedGame fallbackDetectionResult = fallbackDetect(allFiles, fslist, &extraInfo);
 
 		if (fallbackDetectionResult.desc) {
 			DetectedGame fallbackDetectedGame = toDetectedGame(fallbackDetectionResult);
 			fallbackDetectedGame.preferredTarget += "-fallback";
 
+			// if we have extraInfo here
+			if (extraInfo != nullptr) {
+				// if we have specified game name or targetID, then we replace the original one
+				// maybe we need to use generatePreferredTarget to generate it
+				if (!extraInfo->gameName.empty())
+					fallbackDetectedGame.description = extraInfo->gameName;
+				if (!extraInfo->targetID.empty())
+					fallbackDetectedGame.preferredTarget = extraInfo->targetID;
+
+				// then it's our duty to free it
+				delete extraInfo;
+			}
+
 			detectedGames.push_back(fallbackDetectedGame);
 		}
 	}
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index dff8f9474f..64eb74d349 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -164,8 +164,8 @@ struct ADGameDescription {
  * struct which saved extra information for detected games
  */
 struct ADDetectedGameExtraInfo {
-	const char *gameName;			/*!< Extra info which saved game name */
-	const char *targetID;			/*!< targetID which will be used on preferred target id */
+	Common::String gameName;			/*!< Extra info which saved game name */
+	Common::String targetID;			/*!< targetID which will be used on preferred target id */
 };
 
 /**


Commit: 6e3551049c3ca8e8629d50c614193e83b7f1f724
    https://github.com/scummvm/scummvm/commit/6e3551049c3ca8e8629d50c614193e83b7f1f724
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: pass extra info in fallback detection

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index e7112e68c4..4700c6abab 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -328,7 +328,7 @@ public:
 		return debugFlagList;
 	}
 
-	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
+	ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extraInfo) const override;
 };
 
 static Director::DirectorGameDescription s_fallbackDesc = {
@@ -348,7 +348,7 @@ static Director::DirectorGameDescription s_fallbackDesc = {
 static char s_fallbackFileNameBuffer[51];
 static char s_fallbackExtraBuf[256];
 
-ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
+ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extraInfo) const {
 	// TODO: Handle Mac fallback
 
 	// reset fallback description
@@ -385,8 +385,13 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
 			desc->version = atoi(version.c_str());
 			desc->desc.platform = Common::parsePlatform(platform);
-			Common::strlcpy(s_fallbackExtraBuf, gameName.c_str(), sizeof(s_fallbackExtraBuf) - 1);
-			desc->desc.extra = s_fallbackExtraBuf;
+
+			// if we have extra info slots
+			if (extraInfo != nullptr) {
+				*extraInfo = new ADDetectedGameExtraInfo;
+				(*extraInfo)->targetID = targetID;
+				(*extraInfo)->gameName = gameName;
+			}
 
 			ADDetectedGame game(&desc->desc);
 			return game;


Commit: 65f36c33ffcfdc54931d214840329886a8f0e51b
    https://github.com/scummvm/scummvm/commit/65f36c33ffcfdc54931d214840329886a8f0e51b
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
ENGINES: extend toDetectedGames to deal with ADDetectedGameExtraInfo.

Changed paths:
    engines/advancedDetector.cpp
    engines/advancedDetector.h
    engines/mohawk/detection.cpp


diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index e7391c3345..1451af7d0e 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -121,10 +121,12 @@ static Common::String sanitizeName(const char *name, int maxLen) {
  * or (if ADGF_DEMO has been set)
  *   GAMEID-demo-PLAFORM-LANG
  */
-static Common::String generatePreferredTarget(const ADGameDescription *desc, int maxLen) {
+static Common::String generatePreferredTarget(const ADGameDescription *desc, int maxLen, Common::String targetID) {
 	Common::String res;
 
-	if (desc->flags & ADGF_AUTOGENTARGET && desc->extra && *desc->extra) {
+	if (!targetID.empty()) {
+		res = targetID;
+	} else if (desc->flags & ADGF_AUTOGENTARGET && desc->extra && *desc->extra) {
 		res = sanitizeName(desc->extra, maxLen);
 	} else {
 		res = desc->gameId;
@@ -153,7 +155,7 @@ static Common::String generatePreferredTarget(const ADGameDescription *desc, int
 	return res;
 }
 
-DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &adGame) const {
+DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &adGame, ADDetectedGameExtraInfo *extraInfo) const {
 	const ADGameDescription *desc = adGame.desc;
 
 	const char *title;
@@ -171,10 +173,20 @@ DetectedGame AdvancedMetaEngineDetection::toDetectedGame(const ADDetectedGame &a
 		extra = desc->extra;
 	}
 
+	if (extraInfo) {
+		if (!extraInfo->gameName.empty())
+			title = extraInfo->gameName.c_str();
+	}
+
 	DetectedGame game(getEngineId(), desc->gameId, title, desc->language, desc->platform, extra, ((desc->flags & (ADGF_UNSUPPORTED | ADGF_WARNING)) != 0));
 	game.hasUnknownFiles = adGame.hasUnknownFiles;
 	game.matchedFiles = adGame.matchedFiles;
-	game.preferredTarget = generatePreferredTarget(desc, _maxAutogenLength);
+
+	if (extraInfo && !extraInfo->targetID.empty()) {
+		game.preferredTarget = generatePreferredTarget(desc, _maxAutogenLength, extraInfo->targetID);
+	} else {
+		game.preferredTarget = generatePreferredTarget(desc, _maxAutogenLength, Common::String());
+	}
 
 	game.gameSupportLevel = kStableGame;
 	if (desc->flags & ADGF_UNSTABLE)
@@ -259,20 +271,14 @@ DetectedGames AdvancedMetaEngineDetection::detectGames(const Common::FSList &fsl
 		ADDetectedGame fallbackDetectionResult = fallbackDetect(allFiles, fslist, &extraInfo);
 
 		if (fallbackDetectionResult.desc) {
-			DetectedGame fallbackDetectedGame = toDetectedGame(fallbackDetectionResult);
-			fallbackDetectedGame.preferredTarget += "-fallback";
+			DetectedGame fallbackDetectedGame = toDetectedGame(fallbackDetectionResult, extraInfo);
 
-			// if we have extraInfo here
 			if (extraInfo != nullptr) {
-				// if we have specified game name or targetID, then we replace the original one
-				// maybe we need to use generatePreferredTarget to generate it
-				if (!extraInfo->gameName.empty())
-					fallbackDetectedGame.description = extraInfo->gameName;
-				if (!extraInfo->targetID.empty())
-					fallbackDetectedGame.preferredTarget = extraInfo->targetID;
-
 				// then it's our duty to free it
 				delete extraInfo;
+			} else {
+				// don't add fallback when we are specifying the targetID
+				fallbackDetectedGame.preferredTarget += "-fallback";
 			}
 
 			detectedGames.push_back(fallbackDetectedGame);
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 64eb74d349..de7abf00b8 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -440,7 +440,7 @@ protected:
 	bool getFileProperties(const FileMap &allFiles, const ADGameDescription &game, const Common::String fname, FileProperties &fileProps) const;
 
 	/** Convert an AD game description into the shared game description format. */
-	virtual DetectedGame toDetectedGame(const ADDetectedGame &adGame) const;
+	virtual DetectedGame toDetectedGame(const ADDetectedGame &adGame, ADDetectedGameExtraInfo *extraInfo = nullptr) const;
 
 	/** Check for pirated games in the given detected games */
 	bool cleanupPirated(ADDetectedGames &matched) const;
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 7caac7f11b..5b7e4938b6 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -102,12 +102,12 @@ public:
 		return "Myst and Riven (C) Cyan Worlds\nMohawk OS (C) Ubisoft";
 	}
 
-	DetectedGame toDetectedGame(const ADDetectedGame &adGame) const override;
+	DetectedGame toDetectedGame(const ADDetectedGame &adGame, ADDetectedGameExtraInfo *extraInfo) const override;
 
 	void registerDefaultSettings(const Common::String &target) const override;
 };
 
-DetectedGame MohawkMetaEngineDetection::toDetectedGame(const ADDetectedGame &adGame) const {
+DetectedGame MohawkMetaEngineDetection::toDetectedGame(const ADDetectedGame &adGame, ADDetectedGameExtraInfo *extraInfo) const {
 	DetectedGame game = AdvancedMetaEngineDetection::toDetectedGame(adGame);
 
 	// The AdvancedDetector model only allows specifying a single supported


Commit: 073db5b715c2b883ddbfc588968f3f5c0c400bd2
    https://github.com/scummvm/scummvm/commit/073db5b715c2b883ddbfc588968f3f5c0c400bd2
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: resolve conflicts and remove warnings

Changed paths:
    engines/director/detection.cpp
    engines/director/detection_tables.h


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index 4700c6abab..ac21bfcdd0 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -29,241 +29,93 @@
 #include "director/detection.h"
 #include "director/director.h"
 
-static const PlainGameDescriptor directorGames[] = {
-	{ "director",			"Macromedia Director Game" },
-	{ "directortest",		"Macromedia Director Test Target" },
-	{ "directortest-all",	"Macromedia Director All Movies Test Target" },
-	{ "theapartment",		"The Apartment, Interactive demo" },
-
-	{ "9worlds",			"Nine Worlds hosted by Patrick Stewart"},
-	{ "alexworld",			"ALeX-WORLD"},
-	{ "alice",				"Alice: An Interactive Museum"},
-	{ "amandastories",		"AmandaStories"},
-	{ "amber",				"AMBER: Journeys Beyond"},
-	{ "ankh1",				"Ankh: Mystery of the Pyramids"},
-	{ "ankh2",				"Ankh 2: Mystery of Tutankhamen"},
-	{ "ankh3",				"Ankh 3"},
-	{ "arcofdoom",			"Arc of Doom"},
-	{ "artrageous",			"ArtRageous!"},
-	{ "asimovrat",			"Robotoid Assembly Toolkit"},
-	{ "ataripack",			"Activision's Atari 2600 Action Pack"},
-	{ "badday",				"Bad Day on the Midway"},
-	{ "beyondthewall",		"Beyond the Wall of Stars"},
-	{ "bookshelf94",		"Microsoft Bookshelf '94"},
-	{ "bowie",				"JUMP: The David Bowie Interactive CD-ROM"},
-	{ "bpmc",				"Byron Preiss Multimedia Catalog"},
-	{ "chaos",				"The C.H.A.O.S. Continuum"},
-	{ "chopsuey",   		"Chop Suey" },
-	{ "chuteng",   			"Chu-Teng" },
-	{ "daedalus",			"The Daedalus Encounter"},
-	{ "darkeye",			"The Dark Eye"},
-	{ "derratsorcerum",		"Derrat Sorcerum"},
-	{ "devo",				"DEVO Presents: Adventures of the Smart Patrol"},
-	{ "earthtia",			"Earthtia Saga: Larthur's Legend"},
-	{ "easternmind",		"Eastern Mind: The Lost Souls of Tong Nou"},
-	{ "earthwormjim",		"Earthworm Jim"},
-	{ "einstein",			"The Ultimate Einstein"},
-	{ "encarta94",			"Microsoft Encarta '94"},
-	{ "encarta95",			"Microsoft Encarta '95"},
-	{ "ernie",				"Ernie"},
-	{ "flw",				"The Ultimate Frank Lloyd Wright: America's Architect"},
-	{ "frankenstein",		"Frankenstein: Through the Eyes of the Monster"},
-	{ "freakshow",			"Freak Show"},
-	{ "gadget",				"Gadget: Invention, Travel, & Adventure"},
-	{ "gundam0079",			"Gundam 0079: The War for Earth" },
-	{ "hamsterland1",		"Busy People of Hamsterland" },
-	{ "hamsterland2",		"Hamsterland: The Time Machine" },
-	{ "hhouse",				"Gahan Wilson's The Ultimate Haunted House" },
-	{ "horrortour1",		"Zeddas: Servant of Sheol"},
-	{ "horrortour2",		"Zeddas: Horror Tour 2"},
-	{ "horrortour3",		"Labyrinthe"},
-	{ "hyperblade",			"HyperBlade" },
-	{ "id4p1",     			"iD4 Mission Disk 1 - Alien Supreme Commander" },
-	{ "id4p2",      		"iD4 Mission Disk 2 - Alien Science Officer" },
-	{ "id4p3",      		"iD4 Mission Disk 3 - Warrior Alien" },
-	{ "id4p4",      		"iD4 Mission Disk 4 - Alien Navigator" },
-	{ "id4p5",      		"iD4 Mission Disk 5 - Captain Steve Hiller" },
-	{ "id4p6",      		"iD4 Mission Disk 6 - Dave's Computer" },
-	{ "id4p7",      		"iD4 Mission Disk 7 - President Whitmore" },
-	{ "id4p8",      		"iD4 Mission Disk 8 - Alien Attack Fighter" },
-	{ "id4p9",      		"iD4 Mission Disk 9 - FA-18 Fighter Jet" },
-	{ "id4p10",     		"iD4 Mission Disk 10 - Alien Bomber" },
-	{ "id4p11",     		"iD4 Mission Disk 11 - Area 51" },
-	{ "improv",     		"Don't Quit Your Day Job" },
-	{ "ironhelix",			"Iron Helix" },
-	{ "isis",				"Isis"},
-	{ "jewels",				"Jewels of the Oracle" },
-	{ "jman",				"The Journeyman Project" },
-	{ "jman2",				"The Journeyman Project 2: Buried in Time" },
-	{ "jmmd",       		"Just Me & My Dad" },
-	{ "karma",				"Karma: Curse of the 12 Caves" },
-	{ "kyoto",				"Cosmology of Kyoto" },
-	{ "lion",				"Lion" },
-	{ "louiscatorze",		"Louis Cat Orze: The Mystery of the Queen's Necklace" },
-	{ "lzone",				"L-ZONE"},
-	{ "madmac",				"Mad Mac Cartoons"},
-	{ "majestic",			"Majestic Part I: Alien Encounter" },
-	{ "martian",			"Ray Bradbury's The Martian Chronicles Adventure Game" },
-	{ "maze",				"The Riddle of the Maze"},
-	{ "mechwarrior2",		"MechWarrior 2" },
-	{ "mediaband",			"Meet Mediaband" },
-	{ "melements",			"Masters of the Elements" },
-	{ "mirage",				"Mirage" },
-	{ "mummy",				"Mummy: Tomb of the Pharaoh"},
-	{ "muppets",			"Muppet Treasure Island" },
-	{ "murderbrett",		"Who Killed Brett Penance?"},
-	{ "murdermagic",		"The Magic Death"},
-	{ "murdersam",			"Who Killed Sam Rupert?"},
-	{ "murdertaylor",		"Who Killed Taylor French? The Case of the Undressed Reporter"},
-	{ "mylk",				"Mylk"},
-	{ "mysteriousegypt",	"Mysterious Egypt"},
-	{ "necrobius",			"Necrobius"},
-	{ "nile",				"Nile: Passage to Egypt"},
-	{ "noir",				"Noir: A Shadowy Thriller"},
-	{ "operafatal",			"Opera Fatal"},
-	{ "paws",				"P.A.W.S.: Personal Automated Wagging System"},
-	{ "phantasplanet",		"Phantasmagoria Amusement Planet"},
-	{ "pitfall",			"Pitfall: The Mayan Adventure" },
-	{ "planetarizona",		"Escape from Planet Arizona" },
-	{ "prescue",			"Paradise Rescue" },
-	{ "refixion1",			"Refixion"},
-	{ "refixion2",			"Refixion II: Museum or Hospital"},
-	{ "refixion3",			"Refixion III: The Reindeer Story"},
-	{ "rodney",				"Rodney's Funscreen"},
-	{ "saillusion",     	"Scientific American Library: Illusion" },
-	{ "sakin2",				"Sakin II"},
-	{ "santafe1",			"Santa Fe Mysteries: The Elk Moon Murder"},
-	{ "sauniverse",     	"Scientific American Library: The Universe" },
-	{ "sciencesmart",		"Science Smart"},
-	{ "screamingmetal",		"Screaming Metal"},
-	{ "shanghai",			"Shanghai: Great Moments"},
-	{ "simpsons",			"The Simpsons: Cartoon Studio"},
-	{ "skyborg",			"SkyBorg: Into the Vortex"},
-	{ "snh",				"A Silly Noisy House"},
-	{ "splayer",			"The Simpsons: Cartoon Studio Player"},
-	{ "spyclub",			"Spy Club" },
-	{ "spycraft",			"Spycraft: The Great Game" },
-	{ "staytooned",			"Stay Tooned!" },
-	{ "superspy",			"SuperSpy 1" },
-	{ "teamxtreme1",		"Operation: Weather Disaster" },
-	{ "teamxtreme2",		"Operation: Eco-Nightmare" },
-	{ "teddybear",			"Operation Teddy Bear" },
-	{ "the7colors",			"The Seven Colors: Legend of PSY-S City"},
-	{ "totaldistortion",	"Total Distortion"},
-	{ "trekborg",			"Star Trek: Borg"},
-	{ "trekguideds9",		"Star Trek: Deep Space Nine Episode Guide"},
-	{ "trekguidetng",		"Star Trek: The Next Generation Episode Guide"},
-	{ "trekklingon",		"Star Trek: Klingon"},
-	{ "trekomni",			"Star Trek Omnipedia"},
-	{ "trekpedia98",		"Star Trek Encyclopedia 1998"},
-	{ "trektech",			"Star Trek: The Next Generation Interactive Technical Manual"},
-	{ "tri3dtrial",			"Tri-3D-Trial"},
-	{ "twistynight1",		"Twisty Night #1"},
-	{ "twistynight2",		"Twisty Night #2"},
-	{ "twistynight3",		"Twisty Night #3"},
-	{ "ushistory",			"The History of the United States for Young People"},
-	{ "vvcyber",			"Victor Vector & Yondo: The Cyberplasm Formula"},
-	{ "vvdinosaur",			"Victor Vector & Yondo: The Last Dinosaur Egg"},
-	{ "vvharp",				"Victor Vector & Yondo: The Hypnotic Harp"},
-	{ "vvvampire",			"Victor Vector & Yondo: The Vampire's Coffin"},
-	{ "warlock", 			"Spaceship Warlock"},
-	{ "wishbone", 			"Wishbone and the Amazing Odyssey"},
-	{ "wrath",				"Wrath of the Gods"},
-	{ "xanthus",			"Xanthus"},
-	{ "xfua",				"The X-Files Unrestricted Access"},
-	{ "ybr1",				"Yellow Brick Road"},
-	{ "ybr2",				"Yellow Brick Road II"},
-	{ "ybr3",				"Yellow Brick Road III"},
-	{ "znemesis",			"Zork Nemesis: The Forbidden Lands"},
-	{ 0, 0 }
-};
-
 #include "director/detection_tables.h"
 
 namespace Director {
-const char *directoryGlobs[] = {
-	"install",
-	"l_zone",
-	"win_data",						// L-ZONE
-	"data",
-	"gadget",						// Gadget
-	"vnc",
-	"vnc2",							// Virtual Nightclub
-	"program",						// Arc Media products
-	"demodata",						// Edmark demos
-	"media",						// Gundam
-	"mvm",							// Master of the Elements
-	"module_1",
-	"module_2",						// Takeru
-	"simpdata",
-	"simpsons",						// Simpsons Cartoon Studio
-	"dane",							// Polish Kontyngent '99 catalog
-	"datas",						// O!KAY! subscription from Domino Verlag
-	"daten",						// Bibi Blocksberg games (German)
-	"source",						// Grand Prix 2006 directory
-	"data_k",
-	"data_1",
-	"data_2",						// JumpStart World
-	"numbers",						// JumpStart Learning Games
-	"xtras",
-	"files",						// Babar
-	"swanlake",						// Barbie Swan Lake
-	"assets",						// Barbie Nail Designer
-	"fjpc",							// Forestia Jr
-	"movies",						// Mulle Meck (Gary Gadget) series
-	"demos",						// Headbone samplers
-	"blender",						// Blender CD-ROM magazines
-	"bilder",
-	"endsoung",
-	"gerhelp",
-	"gervideo",
-	"mausejagd mit ton",			// Rename from Mäusejagd mit Ton
-	"music",
-	"solos",
-	"sounds",
-	"startsnd",						// GGMD German
-	"duthelp",
-	"dutvideo",
-	"endsound",
-	"muizen in \'t hotel, geluid",	// GGMD Dutch
-	"macos9",
-	"macosx",						// Sethi 3
-	"kripos",
-	"strisser",
-	"polis",
-	"poliisi",
-	"cd_data",						// Polis
-	"fusion macintosh folder",		// Fusion
-	"oslo",							// Oslo's Tools & Gadgets
-	"ojo2000",
-	"stuff",						// Abrapalabra
-	"tooned",						// Stay Tooned
-	"sam rupert",					// Who Killed Sam Rupert?
-	"content",
-	"pcinst",						// Gus and the CyberBuds series
-	"p2data",
-	"p2media",
-	"p3media",
-	"annat",						// Pettson & Findus
-	"fctdata",
-	"fct",					   		// Felix the Cat
-	"dayfiles",
-	"xmasfun",						// Fisher-Price Xmas Fun
-	"95instal",						// Fisher-Price Little People
-	"01",					   		// Doing it in C++
-	"freading",
-	"fsetup",						// My First Reading Words (Eureka)
-	"english",
-	"deutsch",
-	"francais",						// Rename from Français
-	"italiano",						// Virtual Tourism Paris
-	"please copy to hd. G3",		// Rename from HDにコピーして下さい。G3
-	"_files_",						// The Gate
-	"popup",						// Pop Up Computer
-	"alpha",						// Interactive Alphabet
-	"technik",						// Glasklar Technology Interactive
-	0
-};
+	const char *directoryGlobs[] = {
+		"install",
+		"l_zone",
+		"win_data",						// L-ZONE
+		"data",
+		"gadget",						// Gadget
+		"vnc",
+		"vnc2",							// Virtual Nightclub
+		"program",						// Arc Media products
+		"demodata",						// Edmark demos
+		"media",						// Gundam
+		"mvm",							// Master of the Elements
+		"module_1",
+		"module_2",						// Takeru
+		"simpdata",
+		"simpsons",						// Simpsons Cartoon Studio
+		"dane",							// Polish Kontyngent '99 catalog
+		"datas",						// O!KAY! subscription from Domino Verlag
+		"daten",						// Bibi Blocksberg games (German)
+		"source",						// Grand Prix 2006 directory
+		"data_k",
+		"data_1",
+		"data_2",						// JumpStart World
+		"numbers",						// JumpStart Learning Games
+		"xtras",
+		"files",						// Babar
+		"swanlake",						// Barbie Swan Lake
+		"assets",						// Barbie Nail Designer
+		"fjpc",							// Forestia Jr
+		"movies",						// Mulle Meck (Gary Gadget) series
+		"demos",						// Headbone samplers
+		"blender",						// Blender CD-ROM magazines
+		"bilder",
+		"endsoung",
+		"gerhelp",
+		"gervideo",
+		"mausejagd mit ton",			// Rename from Mäusejagd mit Ton
+		"music",
+		"solos",
+		"sounds",
+		"startsnd",						// GGMD German
+		"duthelp",
+		"dutvideo",
+		"endsound",
+		"muizen in \'t hotel, geluid",	// GGMD Dutch
+		"macos9",
+		"macosx",						// Sethi 3
+		"kripos",
+		"strisser",
+		"polis",
+		"poliisi",
+		"cd_data",						// Polis
+		"fusion macintosh folder",		// Fusion
+		"oslo",							// Oslo's Tools & Gadgets
+		"ojo2000",
+		"stuff",						// Abrapalabra
+		"tooned",						// Stay Tooned
+		"sam rupert",					// Who Killed Sam Rupert?
+		"content",
+		"pcinst",						// Gus and the CyberBuds series
+		"p2data",
+		"p2media",
+		"p3media",
+		"annat",						// Pettson & Findus
+		"fctdata",
+		"fct",					   		// Felix the Cat
+		"dayfiles",
+		"xmasfun",						// Fisher-Price Xmas Fun
+		"95instal",						// Fisher-Price Little People
+		"01",					   		// Doing it in C++
+		"freading",
+		"fsetup",						// My First Reading Words (Eureka)
+		"english",
+		"deutsch",
+		"francais",						// Rename from Français
+		"italiano",						// Virtual Tourism Paris
+		"please copy to hd. G3",		// Rename from HDにコピーして下さい。G3
+		"_files_",						// The Gate
+		"popup",						// Pop Up Computer
+		"alpha",						// Interactive Alphabet
+		"technik",						// Glasklar Technology Interactive
+		0
+	};
+}
 
 static const char *customTargetList[] = {
 	"d2-mac",
@@ -304,8 +156,6 @@ public:
 	DirectorMetaEngineDetection() : AdvancedMetaEngineDetection(Director::gameDescriptions, sizeof(Director::DirectorGameDescription), directorGames) {
 		_maxScanDepth = 5;
 		_directoryGlobs = Director::directoryGlobs;
-		_maxScanDepth = 2;
-		_directoryGlobs = directoryGlobs;
 
 		// initialize customTarget hashmap here
 		for (int i = 0; customTargetList[i] != NULL; i++)
@@ -381,7 +231,7 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 			Common::String platform = f.readString('\n');
 			Common::String version = f.readString('\n');
 
-			strncpy(s_fallbackFileNameBuffer, fileName.c_str(), sizeof(s_fallbackFileNameBuffer) - 1);
+			Common::strlcpy(s_fallbackFileNameBuffer, fileName.c_str(), sizeof(s_fallbackFileNameBuffer) - 1);
 			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
 			desc->version = atoi(version.c_str());
 			desc->desc.platform = Common::parsePlatform(platform);
diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index e805536a4a..1193c7af63 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -910,17 +910,6 @@ static const DirectorGameDescription gameDescriptions[] = {
 		400
 	},
 
-	// Generic D2 Mac entry
-	MACGAME1("director", "D2-mac", "D2-mac", 0, -1, 200),
-	// Generic D3 Mac entry
-	MACGAME1("director", "D3-mac", "D3-mac", 0, -1, 300),
-	// Generic D4 Mac entry
-	MACGAME1("director", "D4-mac", "D4-mac", 0, -1, 400),
-	// Generic D3 Win entry
-	WINGAME1("director", "D3-win", "D3-win", 0, -1, 300),
-	// Generic D4 Win entry
-	WINGAME1("director", "D4-win", "D4-win", 0, -1, 400),
-
 	// Original filename is "•Main Menu" for all
 	MACGAME1("theapartment", "D2", "Main Menu", "fc56c179cb8c6d4938e61ee61fd0032c", 48325, 200),
 	MACGAME1("theapartment", "D3", "Main Menu", "9e838fe1a6af7992d656ca325e38dee5", 47911, 300),


Commit: 5c08d58f702297bfdbed6e6c2a2e05bf2d907cbf
    https://github.com/scummvm/scummvm/commit/5c08d58f702297bfdbed6e6c2a2e05bf2d907cbf
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
ENGINES: resolve compile errors

Changed paths:
    engines/sci/metaengine.cpp
    engines/wintermute/metaengine.cpp


diff --git a/engines/sci/metaengine.cpp b/engines/sci/metaengine.cpp
index 5e21cc9eac..1edd321699 100644
--- a/engines/sci/metaengine.cpp
+++ b/engines/sci/metaengine.cpp
@@ -281,7 +281,7 @@ public:
 
 	// A fallback detection method. This is not ideal as all detection lives in MetaEngine, but
 	// here fb detection has many engine dependencies.
-	virtual ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist) const override;
+	virtual ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
 };
 
 Common::Error SciMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
@@ -640,7 +640,7 @@ void constructFallbackDetectionEntry(Common::String &gameId, Common::Platform pl
 	}
 }
 
-ADDetectedGame SciMetaEngine::fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist) const {
+ADDetectedGame SciMetaEngine::fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const {
 	// If necessary SCI files aren't found, it can't be SCI
 	if (!necessarySciResourceFilesFound(allFiles))
 		return ADDetectedGame();
diff --git a/engines/wintermute/metaengine.cpp b/engines/wintermute/metaengine.cpp
index 954a16b5ff..6e635cebb5 100644
--- a/engines/wintermute/metaengine.cpp
+++ b/engines/wintermute/metaengine.cpp
@@ -162,7 +162,7 @@ public:
 		return getWintermuteKeymaps(target, gameId, gameDescr);
 	}
 
-	ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist) const override {
+	ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extraInfo) const override {
 		// Set some defaults
 		s_fallbackDesc.extra = "";
 		s_fallbackDesc.language = Common::UNK_LANG;


Commit: 37a181f3db44ab51446f421144a03d7f48364ca9
    https://github.com/scummvm/scummvm/commit/37a181f3db44ab51446f421144a03d7f48364ca9
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-06-13T14:15:45+02:00

Commit Message:
DIRECTOR: fix indent problem, and for custom target file name, we won't save it since we didn't use it.

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index ac21bfcdd0..a641e962e0 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -32,89 +32,89 @@
 #include "director/detection_tables.h"
 
 namespace Director {
-	const char *directoryGlobs[] = {
-		"install",
-		"l_zone",
-		"win_data",						// L-ZONE
-		"data",
-		"gadget",						// Gadget
-		"vnc",
-		"vnc2",							// Virtual Nightclub
-		"program",						// Arc Media products
-		"demodata",						// Edmark demos
-		"media",						// Gundam
-		"mvm",							// Master of the Elements
-		"module_1",
-		"module_2",						// Takeru
-		"simpdata",
-		"simpsons",						// Simpsons Cartoon Studio
-		"dane",							// Polish Kontyngent '99 catalog
-		"datas",						// O!KAY! subscription from Domino Verlag
-		"daten",						// Bibi Blocksberg games (German)
-		"source",						// Grand Prix 2006 directory
-		"data_k",
-		"data_1",
-		"data_2",						// JumpStart World
-		"numbers",						// JumpStart Learning Games
-		"xtras",
-		"files",						// Babar
-		"swanlake",						// Barbie Swan Lake
-		"assets",						// Barbie Nail Designer
-		"fjpc",							// Forestia Jr
-		"movies",						// Mulle Meck (Gary Gadget) series
-		"demos",						// Headbone samplers
-		"blender",						// Blender CD-ROM magazines
-		"bilder",
-		"endsoung",
-		"gerhelp",
-		"gervideo",
-		"mausejagd mit ton",			// Rename from Mäusejagd mit Ton
-		"music",
-		"solos",
-		"sounds",
-		"startsnd",						// GGMD German
-		"duthelp",
-		"dutvideo",
-		"endsound",
-		"muizen in \'t hotel, geluid",	// GGMD Dutch
-		"macos9",
-		"macosx",						// Sethi 3
-		"kripos",
-		"strisser",
-		"polis",
-		"poliisi",
-		"cd_data",						// Polis
-		"fusion macintosh folder",		// Fusion
-		"oslo",							// Oslo's Tools & Gadgets
-		"ojo2000",
-		"stuff",						// Abrapalabra
-		"tooned",						// Stay Tooned
-		"sam rupert",					// Who Killed Sam Rupert?
-		"content",
-		"pcinst",						// Gus and the CyberBuds series
-		"p2data",
-		"p2media",
-		"p3media",
-		"annat",						// Pettson & Findus
-		"fctdata",
-		"fct",					   		// Felix the Cat
-		"dayfiles",
-		"xmasfun",						// Fisher-Price Xmas Fun
-		"95instal",						// Fisher-Price Little People
-		"01",					   		// Doing it in C++
-		"freading",
-		"fsetup",						// My First Reading Words (Eureka)
-		"english",
-		"deutsch",
-		"francais",						// Rename from Français
-		"italiano",						// Virtual Tourism Paris
-		"please copy to hd. G3",		// Rename from HDにコピーして下さい。G3
-		"_files_",						// The Gate
-		"popup",						// Pop Up Computer
-		"alpha",						// Interactive Alphabet
-		"technik",						// Glasklar Technology Interactive
-		0
-	};
+const char *directoryGlobs[] = {
+	"install",
+	"l_zone",
+	"win_data",						// L-ZONE
+	"data",
+	"gadget",						// Gadget
+	"vnc",
+	"vnc2",							// Virtual Nightclub
+	"program",						// Arc Media products
+	"demodata",						// Edmark demos
+	"media",						// Gundam
+	"mvm",							// Master of the Elements
+	"module_1",
+	"module_2",						// Takeru
+	"simpdata",
+	"simpsons",						// Simpsons Cartoon Studio
+	"dane",							// Polish Kontyngent '99 catalog
+	"datas",						// O!KAY! subscription from Domino Verlag
+	"daten",						// Bibi Blocksberg games (German)
+	"source",						// Grand Prix 2006 directory
+	"data_k",
+	"data_1",
+	"data_2",						// JumpStart World
+	"numbers",						// JumpStart Learning Games
+	"xtras",
+	"files",						// Babar
+	"swanlake",						// Barbie Swan Lake
+	"assets",						// Barbie Nail Designer
+	"fjpc",							// Forestia Jr
+	"movies",						// Mulle Meck (Gary Gadget) series
+	"demos",						// Headbone samplers
+	"blender",						// Blender CD-ROM magazines
+	"bilder",
+	"endsoung",
+	"gerhelp",
+	"gervideo",
+	"mausejagd mit ton",			// Rename from Mäusejagd mit Ton
+	"music",
+	"solos",
+	"sounds",
+	"startsnd",						// GGMD German
+	"duthelp",
+	"dutvideo",
+	"endsound",
+	"muizen in \'t hotel, geluid",	// GGMD Dutch
+	"macos9",
+	"macosx",						// Sethi 3
+	"kripos",
+	"strisser",
+	"polis",
+	"poliisi",
+	"cd_data",						// Polis
+	"fusion macintosh folder",		// Fusion
+	"oslo",							// Oslo's Tools & Gadgets
+	"ojo2000",
+	"stuff",						// Abrapalabra
+	"tooned",						// Stay Tooned
+	"sam rupert",					// Who Killed Sam Rupert?
+	"content",
+	"pcinst",						// Gus and the CyberBuds series
+	"p2data",
+	"p2media",
+	"p3media",
+	"annat",						// Pettson & Findus
+	"fctdata",
+	"fct",					   		// Felix the Cat
+	"dayfiles",
+	"xmasfun",						// Fisher-Price Xmas Fun
+	"95instal",						// Fisher-Price Little People
+	"01",					   		// Doing it in C++
+	"freading",
+	"fsetup",						// My First Reading Words (Eureka)
+	"english",
+	"deutsch",
+	"francais",						// Rename from Français
+	"italiano",						// Virtual Tourism Paris
+	"please copy to hd. G3",		// Rename from HDにコピーして下さい。G3
+	"_files_",						// The Gate
+	"popup",						// Pop Up Computer
+	"alpha",						// Interactive Alphabet
+	"technik",						// Glasklar Technology Interactive
+	0
+};
 }
 
 static const char *customTargetList[] = {
@@ -231,8 +231,6 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 			Common::String platform = f.readString('\n');
 			Common::String version = f.readString('\n');
 
-			Common::strlcpy(s_fallbackFileNameBuffer, fileName.c_str(), sizeof(s_fallbackFileNameBuffer) - 1);
-			desc->desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer;
 			desc->version = atoi(version.c_str());
 			desc->desc.platform = Common::parsePlatform(platform);
 




More information about the Scummvm-git-logs mailing list