Skip to content

Commit

Permalink
Merge pull request #4 from x1nixmzeng/fix-arg-reading
Browse files Browse the repository at this point in the history
Cleanup parameter reading - fixes #1
  • Loading branch information
x1nixmzeng authored Jan 3, 2021
2 parents 8e19c8c + 1b2e9b3 commit 2157eaf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class App : public Singleton<App> {
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] <iso_file> <mount_path>\n";
std::wcout << "xbox-iso-vfs.exe [/d] <iso_file> <mount_path>\n";
std::wcout
<< " /d Display debug Dokan output in console window\n";
// std::wcout << " /l Launch the mount path when successful\n";
Expand All @@ -153,12 +153,14 @@ class App : public Singleton<App> {
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;
Expand All @@ -167,7 +169,7 @@ class App : public Singleton<App> {
}

if (params.filePath.empty()) {
showUsage();
std::wcout << "Missing iso_file parameter. Use --help to see usage\n";
return false;
}

Expand All @@ -179,7 +181,7 @@ class App : public Singleton<App> {
}

if (params.mountPoint.empty()) {
showUsage();
std::wcout << "Missing mount_path parameter. Use --help to see usage\n";
return false;
}

Expand Down

0 comments on commit 2157eaf

Please sign in to comment.