diff options
author | Eugene Sandulenko | 2011-06-17 10:19:57 -0700 |
---|---|---|
committer | Eugene Sandulenko | 2011-06-17 10:19:57 -0700 |
commit | 94ad45b0589faf3e316ecd988831e2d99f5ea28d (patch) | |
tree | e6fa68545dcf02cd8422b4a01e0bdb5d2f2ab385 /engines/advancedDetector.cpp | |
parent | 27890ec3e2cb708fc18f46f839dc8ce9d8311b3d (diff) | |
parent | 901b6191c5066ee373a588ad593bffa9ee076dca (diff) | |
download | scummvm-rg350-94ad45b0589faf3e316ecd988831e2d99f5ea28d.tar.gz scummvm-rg350-94ad45b0589faf3e316ecd988831e2d99f5ea28d.tar.bz2 scummvm-rg350-94ad45b0589faf3e316ecd988831e2d99f5ea28d.zip |
Merge pull request #30 from tsoliman/configure-enhancement-warning-clean
Configure enhancement warning clean
Diffstat (limited to 'engines/advancedDetector.cpp')
-rw-r--r-- | engines/advancedDetector.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 7ae4d7718a..d864fe8b52 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -51,7 +51,13 @@ static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGa extra = g.extra; } - GameDescriptor gd(g.gameid, title, g.language, g.platform); + GameSupportLevel gsl = kStableGame; + if (g.flags & ADGF_UNSTABLE) + gsl = kUnstableGame; + else if (g.flags & ADGF_TESTING) + gsl = kTestingGame; + + GameDescriptor gd(g.gameid, title, g.language, g.platform, 0, gsl); gd.updateDesc(extra); return gd; } @@ -253,8 +259,21 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) Common::updateGameGUIOptions(agdDesc->guioptions | _guioptions, lang); + GameDescriptor gameDescriptor = toGameDescriptor(*agdDesc, _gameids); + + bool showTestingWarning = false; + +#ifdef RELEASE_BUILD + showTestingWarning = true; +#endif + + if (((gameDescriptor.getSupportLevel() == kUnstableGame + || (gameDescriptor.getSupportLevel() == kTestingGame + && showTestingWarning))) + && !Engine::warnUserAboutUnsupportedGame()) + return Common::kUserCanceled; - debug(2, "Running %s", toGameDescriptor(*agdDesc, _gameids).description().c_str()); + debug(2, "Running %s", gameDescriptor.description().c_str()); if (!createInstance(syst, engine, agdDesc)) return Common::kNoGameDataFoundError; else |