From 04b45b5581d72225a30a9dd4965d1dceec7ce5a1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 23 Nov 2020 14:28:30 -0800 Subject: [PATCH] Allow testing a specific controller --- test/testgamecontroller.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index cf5eaf734..7f3af1e29 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -448,6 +448,10 @@ main(int argc, char *argv[]) /* !!! FIXME: */ /*SDL_RenderSetLogicalSize(screen, background->w, background->h);*/ + if (argv[1] && *argv[1] != '-') { + gamecontroller = SDL_GameControllerOpen(SDL_atoi(argv[1])); + } + UpdateWindowTitle(); /* Loop, getting controller events! */