From 8726f500ef7aabda724e01c085fb4f0bb2027442 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 3 Aug 2021 01:10:48 -0700 Subject: [PATCH] Allow quitting controllermap if there are no controllers attached --- test/controllermap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllermap.c b/test/controllermap.c index d55dc8046..f81528ea2 100644 --- a/test/controllermap.c +++ b/test/controllermap.c @@ -746,7 +746,7 @@ main(int argc, char *argv[]) return 2; } - while (SDL_NumJoysticks() == 0) { + while (!done && SDL_NumJoysticks() == 0) { SDL_Event event; while (SDL_PollEvent(&event) > 0) {