test/testgamecontroller.c
changeset 10661 74b42fb2a9e4
parent 10597 7b2a0f5a4380
child 10691 c02fe6ba1cfd
equal deleted inserted replaced
10660:1ae4e8001b73 10661:74b42fb2a9e4
   257         return 1;
   257         return 1;
   258     }
   258     }
   259     
   259     
   260     SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
   260     SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
   261 
   261 
       
   262     /* Print information about the mappings */
       
   263     SDL_Log("Supported mappings:\n");
       
   264     for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {
       
   265         char *mapping = SDL_GameControllerMappingForIndex(i);
       
   266         if (mapping) {
       
   267             SDL_Log("\t%s\n", mapping);
       
   268             SDL_free(mapping);
       
   269         }
       
   270     }
       
   271     SDL_Log("\n");
       
   272 
   262     /* Print information about the controller */
   273     /* Print information about the controller */
   263     for (i = 0; i < SDL_NumJoysticks(); ++i) {
   274     for (i = 0; i < SDL_NumJoysticks(); ++i) {
   264         const char *name;
   275         const char *name;
   265         const char *description;
   276         const char *description;
   266 
   277