aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glulxe
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/glulxe')
-rw-r--r--engines/glk/glulxe/detection.cpp8
-rw-r--r--engines/glk/glulxe/detection.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/glk/glulxe/detection.cpp b/engines/glk/glulxe/detection.cpp
index c2e19de4e9..fb701131ef 100644
--- a/engines/glk/glulxe/detection.cpp
+++ b/engines/glk/glulxe/detection.cpp
@@ -106,5 +106,13 @@ bool GlulxeMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &
return !gameList.empty();
}
+void GlulxeMetaEngine::detectClashes(Common::StringMap &map) {
+ for (const GlulxeDescriptor *pd = GLULXE_GAME_LIST; pd->gameId; ++pd) {
+ if (map.contains(pd->gameId))
+ error("Duplicate game Id found - %s", pd->gameId);
+ map[pd->gameId] = "";
+ }
+}
+
} // End of namespace Glulxe
} // End of namespace Glk
diff --git a/engines/glk/glulxe/detection.h b/engines/glk/glulxe/detection.h
index d6d5c6a9ad..654977a0b2 100644
--- a/engines/glk/glulxe/detection.h
+++ b/engines/glk/glulxe/detection.h
@@ -24,6 +24,7 @@
#define GLK_GLULXE_DETECTION
#include "common/fs.h"
+#include "common/hash-str.h"
#include "engines/game.h"
namespace Glk {
@@ -63,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 Glulxe