aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2017-08-06 18:54:42 +0100
committerThierry Crozat2017-08-06 19:14:13 +0100
commit8e5b8510c852335c0cc65441550110a8dcf64d4e (patch)
tree837ba96ff730f8d6c3694f30a565d9e5e5e73814
parent78253e38d1f22b9798c23a23d4a411d533bf4eb8 (diff)
downloadscummvm-rg350-8e5b8510c852335c0cc65441550110a8dcf64d4e.tar.gz
scummvm-rg350-8e5b8510c852335c0cc65441550110a8dcf64d4e.tar.bz2
scummvm-rg350-8e5b8510c852335c0cc65441550110a8dcf64d4e.zip
CMD: Improve warnings for --detect and --add when no game is found
-rw-r--r--base/commandLine.cpp6
1 files changed, 5 insertions, 1 deletions
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=<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");
}