diff options
author | Paul Gilbert | 2018-12-14 18:25:20 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-14 18:25:20 -0800 |
commit | b84ee752cf50448590391b7c5e9f7ec448b9adfb (patch) | |
tree | 0ddaba980ca2ff929c14932d521ac9861ab900b5 /engines/glk/tads | |
parent | c3bc9f80b5847eaa261d05fbc779675c99436f2c (diff) | |
download | scummvm-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/tads')
-rw-r--r-- | engines/glk/tads/detection.cpp | 8 | ||||
-rw-r--r-- | engines/glk/tads/detection.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/glk/tads/detection.cpp b/engines/glk/tads/detection.cpp index df7eee1585..95f7330d65 100644 --- a/engines/glk/tads/detection.cpp +++ b/engines/glk/tads/detection.cpp @@ -96,5 +96,13 @@ bool TADSMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga return !gameList.empty(); } +void TADSMetaEngine::detectClashes(Common::StringMap &map) { + for (const TADSDescriptor *pd = TADS_GAME_LIST; pd->gameId; ++pd) { + if (map.contains(pd->gameId)) + error("Duplicate game Id found - %s", pd->gameId); + map[pd->gameId] = ""; + } +} + } // End of namespace TADS } // End of namespace Glk diff --git a/engines/glk/tads/detection.h b/engines/glk/tads/detection.h index 3e4d3e3a00..f876cb2cf2 100644 --- a/engines/glk/tads/detection.h +++ b/engines/glk/tads/detection.h @@ -64,6 +64,11 @@ public: * Detect supported games */ static bool detectGames(const Common::FSList &fslist, DetectedGames &gameList); + + /** + * Check for game Id clashes with other sub-engines + */ + static void detectClashes(Common::StringMap &map); }; } // End of namespace TADS |