aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gargoyle/detection.cpp19
-rw-r--r--engines/gargoyle/gargoyle.cpp5
2 files changed, 14 insertions, 10 deletions
diff --git a/engines/gargoyle/detection.cpp b/engines/gargoyle/detection.cpp
index b7a32a780a..63ada3e5dd 100644
--- a/engines/gargoyle/detection.cpp
+++ b/engines/gargoyle/detection.cpp
@@ -68,6 +68,7 @@ static const PlainGameDescriptor gargoyleGames[] = {
};
#include "common/config-manager.h"
+#include "common/file.h"
#include "gargoyle/detection_tables.h"
#include "gargoyle/scott/detection.h"
#include "gargoyle/scott/scott.h"
@@ -158,15 +159,19 @@ ADDetectedGames GargoyleMetaEngine::detectGame(const Common::FSNode &parent, con
ADDetectedGames detectedGames;
static char gameId[100];
strcpy(gameId, ConfMan.get("gameid").c_str());
+ Common::String filename = ConfMan.get("filename");
- gameDescription.desc.gameId = gameId;
- gameDescription.desc.language = language;
- gameDescription.desc.platform = platform;
- gameDescription.desc.extra = extra.c_str();
- gameDescription.filename = ConfMan.get("filename");
+ if (parent.getChild(filename).exists()) {
+ gameDescription.desc.gameId = gameId;
+ gameDescription.desc.language = language;
+ gameDescription.desc.platform = platform;
+ gameDescription.desc.extra = extra.c_str();
+ gameDescription.filename = filename;
+
+ ADDetectedGame dg((ADGameDescription *)&gameDescription);
+ detectedGames.push_back(dg);
+ }
- ADDetectedGame dg((ADGameDescription *)&gameDescription);
- detectedGames.push_back(dg);
return detectedGames;
}
diff --git a/engines/gargoyle/gargoyle.cpp b/engines/gargoyle/gargoyle.cpp
index 561f14ae01..5d3d53c7d5 100644
--- a/engines/gargoyle/gargoyle.cpp
+++ b/engines/gargoyle/gargoyle.cpp
@@ -56,9 +56,8 @@ Common::Error GargoyleEngine::run() {
initialize();
Common::File f;
- if (!f.open(getFilename()))
- error("Could not open game file");
- runGame(&f);
+ if (f.open(getFilename()))
+ runGame(&f);
return Common::kNoError;
}