aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-12-03 21:33:44 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitd7c015a17e83c5bc0ce6ceb2601e15e14928b872 (patch)
tree0601dd2a99425f90d16c9913ce439446de354c2f
parent63079834fa7fd7f4592b0a52e709d01b431740e2 (diff)
downloadscummvm-rg350-d7c015a17e83c5bc0ce6ceb2601e15e14928b872.tar.gz
scummvm-rg350-d7c015a17e83c5bc0ce6ceb2601e15e14928b872.tar.bz2
scummvm-rg350-d7c015a17e83c5bc0ce6ceb2601e15e14928b872.zip
GLK: FROTZ: Detect Infocom games using .zip extensions
-rw-r--r--engines/glk/frotz/detection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/frotz/detection.cpp
index 895dd4e1ab..c869c920a8 100644
--- a/engines/glk/frotz/detection.cpp
+++ b/engines/glk/frotz/detection.cpp
@@ -46,7 +46,7 @@ PlainGameDescriptor FrotzMetaEngine::findGame(const char *gameId) {
}
bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
- const char *const EXTENSIONS[10] = { ".dat", ".z1", ".z2", ".z3", ".z4", ".z5", ".z6", ".z7", ".z8", ".zblorb" };
+ const char *const EXTENSIONS[11] = { ".z1", ".z2", ".z3", ".z4", ".z5", ".z6", ".z7", ".z8", ".zblorb", ".dat", ".zip" };
// Loop through the files of the folder
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
@@ -55,7 +55,7 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
continue;
Common::String filename = file->getName();
bool hasExt = false;
- for (int idx = 0; idx < 10 && !hasExt; ++idx)
+ for (int idx = 0; idx < 11 && !hasExt; ++idx)
hasExt = filename.hasSuffixIgnoreCase(EXTENSIONS[idx]);
if (!hasExt)
continue;
@@ -83,8 +83,8 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
DetectedGame gd;
if (!p->_gameId) {
- // Generic .dat files don't get reported as matches unless they have a known md5
- if (filename.hasSuffixIgnoreCase(".dat"))
+ // Generic .dat/.zip files don't get reported as matches unless they have a known md5
+ if (filename.hasSuffixIgnoreCase(".dat") || filename.hasSuffixIgnoreCase(".zip"))
continue;
if (gDebugLevel > 0) {