diff options
author | Tobia Tesan | 2017-07-13 16:30:42 +0200 |
---|---|---|
committer | Thierry Crozat | 2017-08-06 19:14:13 +0100 |
commit | 31c541bedabadc0d6a68c2144aa5d583d4461f0f (patch) | |
tree | 076d2fe04db5346a20f028a4d166de9794c3c876 | |
parent | 426ec1f9897122706f4c298e76d32c72089ebf4a (diff) | |
download | scummvm-rg350-31c541bedabadc0d6a68c2144aa5d583d4461f0f.tar.gz scummvm-rg350-31c541bedabadc0d6a68c2144aa5d583d4461f0f.tar.bz2 scummvm-rg350-31c541bedabadc0d6a68c2144aa5d583d4461f0f.zip |
CMD: Update error codes in case of autodetector error
-rw-r--r-- | base/commandLine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 17be537b93..fd25b3377f 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -878,9 +878,9 @@ static Common::String detectGames(Common::String path, Common::String recursiveO GameList candidates = recListGames(dir, recursive); if (candidates.empty()) { - printf("ScummVM could not find any game in %s\n", dir.getPath().c_str()); + printf("WARNING: ScummVM could not find any game in %s\n", dir.getPath().c_str()); if (!recursive) { - printf("Consider using --recursive to search inside subdirectories\n"); + printf("WARNING: Consider using --recursive *before* --add or --detect to search inside subdirectories\n"); } return Common::String(); } @@ -1167,15 +1167,18 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo // If we get a non-empty ID, we store it in command so that it gets processed together with the // other command line options below. if (settings["recursive"] == "true") { - printf("Autodetection not supported with --recursive; are you sure you didn't want --detect?\n"); + printf("ERROR: Autodetection not supported with --recursive; are you sure you didn't want --detect?\n"); + err = Common::kUnknownError; return true; // There is not a particularly good technical reason for this. // From an UX point of view, however, it might get confusing. // Consider removing this if consensus says otherwise. } else { command = detectGames(settings["path"], settings["recursive"]); - if (command.empty()) + if (command.empty()) { + err = Common::kNoGameDataFoundError; return true; + } } } else if (command == "detect") { detectGames(settings["path"], settings["recursive"]); |