From 8e5b8510c852335c0cc65441550110a8dcf64d4e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 6 Aug 2017 18:54:42 +0100 Subject: CMD: Improve warnings for --detect and --add when no game is found --- base/commandLine.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'base') diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 475c917bdb..6814abd889 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -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 @@ -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= *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"); } -- cgit v1.2.3