Skip to content
Snippets Groups Projects
Commit db7ca0c4 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Small cmd args fixes

parent e36fcf83
No related branches found
No related tags found
1 merge request!358Updates to SDK and alternative fusion
...@@ -20,10 +20,10 @@ std::map<std::string, std::string> read_options(char ***argv, int *argc) ...@@ -20,10 +20,10 @@ std::map<std::string, std::string> read_options(char ***argv, int *argc)
#else #else
if (std::isdigit(val[0]) || val == "true" || val == "false" || val == "null") { if (std::isdigit(val[0]) || val == "true" || val == "false" || val == "null") {
#endif #endif
opts[cmd.substr(0, p-2)] = val; opts[cmd.substr(0, p)] = val;
} else { } else {
if (val[0] == '\\') opts[cmd.substr(2, p-2)] = val; if (val[0] == '\\') opts[cmd.substr(2, p-2)] = val;
else opts[cmd.substr(0, p-2)] = "\""+val+"\""; else opts[cmd.substr(0, p)] = "\""+val+"\"";
} }
} }
......
...@@ -23,13 +23,15 @@ int main(int argc, char **argv) ...@@ -23,13 +23,15 @@ int main(int argc, char **argv)
for (const auto &s : opts) for (const auto &s : opts)
{ {
cout << "ARGS " << s.first << " " << s.second << endl;
if (s.first == "--no-fusion") if (s.first == "--no-fusion")
{ {
do_fusion = false; do_fusion = false;
} }
else if (s.first == "--display") else if (s.first == "--display")
{ {
if (s.second == "normals") cout << "DISPLAY = " << s.second << endl;
if (s.second == "\"normals\"")
{ {
display_channel = voltu::Channel::kNormals; display_channel = voltu::Channel::kNormals;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment