- 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
This commit is contained in:
Eugene Sandulenko 2006-04-25 23:07:59 +00:00
parent 14beeb3492
commit bf53520130
3 changed files with 16 additions and 4 deletions

View file

@ -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);