aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-09-18 09:47:18 +0000
committerFilippos Karapetis2010-09-18 09:47:18 +0000
commit928bcdbe094767fefb7c415e098d7d9e47bc078d (patch)
tree3a091612c3a4451b0f6e4a12a078f67993d494b6 /engines/sci/detection.cpp
parent1e9e8cd64a97ade7d8f9ff891e511d47b98da70d (diff)
downloadscummvm-rg350-928bcdbe094767fefb7c415e098d7d9e47bc078d.tar.gz
scummvm-rg350-928bcdbe094767fefb7c415e098d7d9e47bc078d.tar.bz2
scummvm-rg350-928bcdbe094767fefb7c415e098d7d9e47bc078d.zip
SCI: Some changes to the fallback detector (sync with branch 1.2.0)
Added more graceful handling of the case where SCI32 isn't built in and the user tries to detect or start a SCI32 game svn-id: r52789
Diffstat (limited to 'engines/sci/detection.cpp')
-rw-r--r--engines/sci/detection.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index fbef406ee7..1944be3358 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -516,6 +516,15 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
resMan->init();
// TODO: Add error handling.
+#ifndef ENABLE_SCI32
+ // Is SCI32 compiled in? If not, and this is a SCI32 game,
+ // stop here
+ if (getSciVersion() >= SCI_VERSION_2) {
+ delete resMan;
+ return (const ADGameDescription *)&s_fallbackDesc;
+ }
+#endif
+
ViewType gameViews = resMan->getViewType();
// Have we identified the game views? If not, stop here
@@ -526,15 +535,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
return 0;
}
-#ifndef ENABLE_SCI32
- // Is SCI32 compiled in? If not, and this is a SCI32 game,
- // stop here
- if (getSciVersion() >= SCI_VERSION_2) {
- delete resMan;
- return (const ADGameDescription *)&s_fallbackDesc;
- }
-#endif
-
// EGA views
if (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga)
s_fallbackDesc.extra = "EGA";