diff options
-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())); |