Skip to content

Commit

Permalink
CMD: Improve warnings for --detect and --add when no game is found
Browse files Browse the repository at this point in the history
  • Loading branch information
criezy committed Aug 6, 2017
1 parent 78253e3 commit 8e5b851
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/commandLine.cpp
Expand Up @@ -870,7 +870,8 @@ static GameList recListGames(Common::FSNode dir, bool recursive) {

/** Display all games in the given directory, return ID of first detected game */
static Common::String detectGames(Common::String path, Common::String recursiveOptStr) {
if (path.empty())
bool noPath = path.empty();
if (noPath)
path = ".";
bool recursive = (recursiveOptStr == "true");
//Current directory
Expand All @@ -879,6 +880,9 @@ static Common::String detectGames(Common::String path, Common::String recursiveO

if (candidates.empty()) {
printf("WARNING: ScummVM could not find any game in %s\n", dir.getPath().c_str());
if (noPath) {
printf("WARNING: Consider using --path=<path> *before* --add or --detect to specify a directory\n");
}
if (!recursive) {
printf("WARNING: Consider using --recursive *before* --add or --detect to search inside subdirectories\n");
}
Expand Down

0 comments on commit 8e5b851

Please sign in to comment.