From 1528e7c3c96fb9af55851f3caef5b55c5188b85f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 6 Jul 2023 12:35:22 -0700 Subject: [PATCH] Fixed mapping a controller other than the first one --- test/gamepadmap.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/gamepadmap.c b/test/gamepadmap.c index c33e4da28..df3b98e11 100644 --- a/test/gamepadmap.c +++ b/test/gamepadmap.c @@ -755,9 +755,13 @@ int main(int argc, char *argv[]) } } if (consumed <= 0) { - static const char *options[] = { "[--bind-touchpad]", NULL }; - SDLTest_CommonLogUsage(state, argv[0], options); - exit(1); + if (argv[i][0] == '-') { + static const char *options[] = { "[--bind-touchpad]", NULL }; + SDLTest_CommonLogUsage(state, argv[0], options); + exit(1); + } else { + break; + } } i += consumed;