From 70aa2a5717b1f62cd6148ddfa494af9edf3831d6 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 9 Dec 2016 04:17:10 -0800 Subject: [PATCH] Only print out the controller mappings if we're not going to test a controller --- test/testgamecontroller.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c index bd63565a3f934..373c842741222 100644 --- a/test/testgamecontroller.c +++ b/test/testgamecontroller.c @@ -260,15 +260,17 @@ main(int argc, char *argv[]) SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); /* Print information about the mappings */ - SDL_Log("Supported mappings:\n"); - for (i = 0; i < SDL_GameControllerNumMappings(); ++i) { - char *mapping = SDL_GameControllerMappingForIndex(i); - if (mapping) { - SDL_Log("\t%s\n", mapping); - SDL_free(mapping); + if (!argv[1]) { + SDL_Log("Supported mappings:\n"); + for (i = 0; i < SDL_GameControllerNumMappings(); ++i) { + char *mapping = SDL_GameControllerMappingForIndex(i); + if (mapping) { + SDL_Log("\t%s\n", mapping); + SDL_free(mapping); + } } + SDL_Log("\n"); } - SDL_Log("\n"); /* Print information about the controller */ for (i = 0; i < SDL_NumJoysticks(); ++i) {