Fix up handling of positional options in cvar handling.

- Fix up handling of positional options in cvar handling so that executables
  other than app can handle them properly.
- Fix command-line arguments for xenia-vfs-dump.
This commit is contained in:
gibbed
2019-08-24 06:23:25 -05:00
committed by Rick Gibbed
parent 16bbfdbb3c
commit 3e6c2bb47c
14 changed files with 81 additions and 39 deletions

View File

@@ -21,9 +21,15 @@
namespace xe {
namespace vfs {
DEFINE_transient_string(source, "", "Specifies the file to dump from.",
"General");
DEFINE_transient_string(dump_path, "",
"Specifies the directory to dump files to.", "General");
int vfs_dump_main(const std::vector<std::wstring>& args) {
if (args.size() <= 2) {
XELOGE("Usage: %s [source] [dump_path]", args[0].c_str());
XELOGE("Usage: %S [source] [dump_path]", args[0].c_str());
return 1;
}
@@ -107,5 +113,5 @@ int vfs_dump_main(const std::vector<std::wstring>& args) {
} // namespace vfs
} // namespace xe
DEFINE_ENTRY_POINT(L"xenia-vfs-dump", L"xenia-vfs-dump",
xe::vfs::vfs_dump_main);
DEFINE_ENTRY_POINT(L"xenia-vfs-dump", xe::vfs::vfs_dump_main,
"[source] [dump_path]", "source", "dump_path");