test/testgamecontroller.c
changeset 10661 74b42fb2a9e4
parent 10597 7b2a0f5a4380
child 10691 c02fe6ba1cfd
     1.1 --- a/test/testgamecontroller.c	Tue Nov 29 05:34:20 2016 -0800
     1.2 +++ b/test/testgamecontroller.c	Tue Nov 29 06:36:57 2016 -0800
     1.3 @@ -259,6 +259,17 @@
     1.4      
     1.5      SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
     1.6  
     1.7 +    /* Print information about the mappings */
     1.8 +    SDL_Log("Supported mappings:\n");
     1.9 +    for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {
    1.10 +        char *mapping = SDL_GameControllerMappingForIndex(i);
    1.11 +        if (mapping) {
    1.12 +            SDL_Log("\t%s\n", mapping);
    1.13 +            SDL_free(mapping);
    1.14 +        }
    1.15 +    }
    1.16 +    SDL_Log("\n");
    1.17 +
    1.18      /* Print information about the controller */
    1.19      for (i = 0; i < SDL_NumJoysticks(); ++i) {
    1.20          const char *name;