mirror of https://github.com/encounter/SDL.git
Only print out the controller mappings if we're not going to test a controller
This commit is contained in:
parent
524bf3c282
commit
70aa2a5717
|
@ -260,15 +260,17 @@ main(int argc, char *argv[])
|
||||||
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
|
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
|
||||||
|
|
||||||
/* Print information about the mappings */
|
/* Print information about the mappings */
|
||||||
SDL_Log("Supported mappings:\n");
|
if (!argv[1]) {
|
||||||
for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {
|
SDL_Log("Supported mappings:\n");
|
||||||
char *mapping = SDL_GameControllerMappingForIndex(i);
|
for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {
|
||||||
if (mapping) {
|
char *mapping = SDL_GameControllerMappingForIndex(i);
|
||||||
SDL_Log("\t%s\n", mapping);
|
if (mapping) {
|
||||||
SDL_free(mapping);
|
SDL_Log("\t%s\n", mapping);
|
||||||
|
SDL_free(mapping);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
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) {
|
||||||
|
|
Loading…
Reference in New Issue