diff options
author | Tarek Soliman | 2011-04-25 15:26:38 -0500 |
---|---|---|
committer | Tarek Soliman | 2011-06-16 13:37:13 -0500 |
commit | 4d0bba314d3b584f15d1d50e59d8f1b8c9a39161 (patch) | |
tree | b6daa3b7cc5fff831af5aba08c389748b5871d3d /engines/advancedDetector.cpp | |
parent | 71759eab534512e7a4df557f12ffadb0062a56ad (diff) | |
download | scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.tar.gz scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.tar.bz2 scummvm-rg350-4d0bba314d3b584f15d1d50e59d8f1b8c9a39161.zip |
ENGINES: Warn user about games marked with ADGF_UNSTABLE flags
ADGF_UNSTABLE is always warned about.
ADGF_TESTING is only warned about when running
configure with --enable-relase.
Both warnings are subject to the enable_wip_game_warning
config option.
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 |