From e3fd8feae6179d975239702a3da3b143bd27a248 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 16 May 2022 06:16:32 -0700 Subject: [PATCH] Fixed getting the controller index when specifying --virtual (thanks @zturtleman) --- test/testgamecontroller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index ef0838cb29..086a340413 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; } }