From 1b2e9b388e03e6e639597641ff5cd81ef25d8b11 Mon Sep 17 00:00:00 2001 From: x1nixmzeng Date: Sun, 3 Jan 2021 23:19:34 +0000 Subject: [PATCH] Cleanup parameter reading --- src/main.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index 5398be0..3d42076 100644 --- a/src/main.cc +++ b/src/main.cc @@ -131,7 +131,7 @@ class App : public Singleton { std::wcout << "xbox-iso-vfs is a utility to mount Xbox ISO files on Windows\n"; std::wcout << "Written by x1nixmzeng\n\n"; - std::wcout << "xbox-iso-vfs.exe [/d|/l] \n"; + std::wcout << "xbox-iso-vfs.exe [/d] \n"; std::wcout << " /d Display debug Dokan output in console window\n"; // std::wcout << " /l Launch the mount path when successful\n"; @@ -153,12 +153,14 @@ class App : public Singleton { return false; } else if (arg == L"--debug" || arg == L"/d") { params.debugMode = true; + continue; } // else if (arg == L"--launch" || arg == L"/l") { // params.launchMountPath = true; //} else if (i + 1 >= argc) { - showUsage(); + std::wcout << "Missing mount_path parameter. Use --help to see usage\n"; + return false; } params.filePath = arg; @@ -167,7 +169,7 @@ class App : public Singleton { } if (params.filePath.empty()) { - showUsage(); + std::wcout << "Missing iso_file parameter. Use --help to see usage\n"; return false; } @@ -179,7 +181,7 @@ class App : public Singleton { } if (params.mountPoint.empty()) { - showUsage(); + std::wcout << "Missing mount_path parameter. Use --help to see usage\n"; return false; }