Fixed getting the controller index when specifying --virtual (thanks @zturtleman)
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index ef0838c..086a340 100644
--- a/test/testgamecontroller.c
+++ b/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;
}
}