Browse Source

Fixed getting the controller index when specifying --virtual (thanks @zturtleman)

Sam Lantinga 2 years ago
parent
commit
e3fd8feae6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      test/testgamecontroller.c

+ 1 - 1
test/testgamecontroller.c

@@ -820,7 +820,7 @@ main(int argc, char *argv[])
             }
         }
         if (argv[i] && *argv[i] != '-') {
-            controller_index = SDL_atoi(argv[1]);
+            controller_index = SDL_atoi(argv[i]);
             break;
         }
     }