Only print out the controller mappings if we're not going to test a controller

This commit is contained in:
Sam Lantinga 2016-12-09 04:17:10 -08:00
parent 524bf3c282
commit 70aa2a5717
1 changed files with 9 additions and 7 deletions

View File

@ -260,6 +260,7 @@ main(int argc, char *argv[])
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
/* Print information about the mappings */ /* Print information about the mappings */
if (!argv[1]) {
SDL_Log("Supported mappings:\n"); SDL_Log("Supported mappings:\n");
for (i = 0; i < SDL_GameControllerNumMappings(); ++i) { for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {
char *mapping = SDL_GameControllerMappingForIndex(i); char *mapping = SDL_GameControllerMappingForIndex(i);
@ -269,6 +270,7 @@ main(int argc, char *argv[])
} }
} }
SDL_Log("\n"); SDL_Log("\n");
}
/* Print information about the controller */ /* Print information about the controller */
for (i = 0; i < SDL_NumJoysticks(); ++i) { for (i = 0; i < SDL_NumJoysticks(); ++i) {