Browse Source

Allow positional arg for game_csv if it is the only arg

master
Gregory Rudolph 4 years ago
parent
commit
672842c923
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 3
      Game.cpp

3
Game.cpp

@ -29,6 +29,9 @@ int main(int argc, char **argv) { @@ -29,6 +29,9 @@ int main(int argc, char **argv) {
// Initialize nextLevel to 0 (load first level)
int next_level = 0;
game_csv = "/sys/sdf/share/csvgame/story.csv";
if (argc == 2) {
game_csv = string(argv[1]);
}
for (int i = 1; i < argc; i++) {
string test_arg = string(argv[i]);
if (test_arg == "-f") {

Loading…
Cancel
Save