aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz/detection.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-12-14 18:25:20 -0800
committerPaul Gilbert2018-12-14 18:25:20 -0800
commitb84ee752cf50448590391b7c5e9f7ec448b9adfb (patch)
tree0ddaba980ca2ff929c14932d521ac9861ab900b5 /engines/glk/frotz/detection.cpp
parentc3bc9f80b5847eaa261d05fbc779675c99436f2c (diff)
downloadscummvm-rg350-b84ee752cf50448590391b7c5e9f7ec448b9adfb.tar.gz
scummvm-rg350-b84ee752cf50448590391b7c5e9f7ec448b9adfb.tar.bz2
scummvm-rg350-b84ee752cf50448590391b7c5e9f7ec448b9adfb.zip
GLK: Detect game Id clashes across different sub-engines
Diffstat (limited to 'engines/glk/frotz/detection.cpp')
-rw-r--r--engines/glk/frotz/detection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/frotz/detection.cpp
index d7725e72a4..2ec48f9087 100644
--- a/engines/glk/frotz/detection.cpp
+++ b/engines/glk/frotz/detection.cpp
@@ -134,6 +134,14 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
return !gameList.empty();
}
+void FrotzMetaEngine::detectClashes(Common::StringMap &map) {
+ for (const PlainGameDescriptor *pd = FROTZ_GAME_LIST; pd->gameId; ++pd) {
+ if (map.contains(pd->gameId))
+ error("Duplicate game Id found - %s", pd->gameId);
+ map[pd->gameId] = "";
+ }
+}
+
bool FrotzMetaEngine::readSavegameHeader(Common::SeekableReadStream *stream, Glk::SavegameHeader &header) {
stream->seek(0);
if (stream->readUint32BE() != ID_FORM)