diff options
author | Eugene Sandulenko | 2006-04-25 23:07:59 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-04-25 23:07:59 +0000 |
commit | bf53520130bbde8a1fb85bebae487d8b489d8f42 (patch) | |
tree | 7270b20eb9fe6fd492126eb6509db6e01739022f | |
parent | 14beeb3492e7d46515d003399ecdbc393d3e1a0f (diff) | |
download | scummvm-rg350-bf53520130bbde8a1fb85bebae487d8b489d8f42.tar.gz scummvm-rg350-bf53520130bbde8a1fb85bebae487d8b489d8f42.tar.bz2 scummvm-rg350-bf53520130bbde8a1fb85bebae487d8b489d8f42.zip |
- Check if path specified for a game in scummvm.ini really exists and complain
if it does not
- Give more understandable feedback to user when SCUMM module can't find
a game
- Put TODO to kyra engine as their current detection scheme does not let
easily tell if game data really present in specified directory
svn-id: r22163
-rw-r--r-- | base/main.cpp | 9 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 7 | ||||
-rw-r--r-- | engines/scumm/plugin.cpp | 4 |
3 files changed, 16 insertions, 4 deletions
diff --git a/base/main.cpp b/base/main.cpp index 00e5b8b49f..95457bef32 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -167,10 +167,15 @@ static bool launcherDialog(GameDetector &detector, OSystem &system) { static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) { // We add it here, so MD5-based detection will be able to // read mixed case files - if (ConfMan.hasKey("path")) + if (ConfMan.hasKey("path")) { + if (!Common::File::exists(ConfMan.get("path"))) { + warning("Game directory does not exist (%s)", ConfMan.get("path").c_str()); + return 0; + } Common::File::addDefaultDirectory(ConfMan.get("path")); - else + } else { Common::File::addDefaultDirectory("."); + } // Create the game engine Engine *engine = plugin->createInstance(&system); diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 46f228ee80..0f0595f6ec 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -299,7 +299,7 @@ KyraEngine::KyraEngine(OSystem *system) } if (!found) { - printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team", md5str); + printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); _features = 0; _game = GI_KYRA1; Common::File test; @@ -323,6 +323,11 @@ KyraEngine::KyraEngine(OSystem *system) _features |= GF_LNGUNK; } } + + // FIXME: TODO: + // Please, deal with a case when _no_ valid game is present + // in specified directory. Currently it just asserts() later + // in the code which is not nice. [sev] } int KyraEngine::init() { diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp index 455fec01e3..4703bf2ab0 100644 --- a/engines/scumm/plugin.cpp +++ b/engines/scumm/plugin.cpp @@ -1312,8 +1312,10 @@ Engine *Engine_SCUMM_create(OSystem *syst) { detectGames(fslist, results, gameid); // Unable to locate game data - if (results.empty()) + if (results.empty()) { + warning("ScummEngine: unable to locate game data"); return 0; + } DetectorResult res(*(results.begin())); |