Allow positional arg for game_csv if it is the only arg

This commit is contained in:
Rudi 2020-10-05 02:35:42 +00:00
parent f831f3cd92
commit 672842c923
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
1 changed files with 3 additions and 0 deletions

View File

@ -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") {