test/testgamecontroller.c
changeset 8043 74fcbf6987ba
parent 7705 e70dc8b38f26
child 8068 54fcab720079
equal deleted inserted replaced
8042:7863121cb7d5 8043:74fcbf6987ba
   223     /* Initialize SDL (Note: video is required to start event loop) */
   223     /* Initialize SDL (Note: video is required to start event loop) */
   224     if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) {
   224     if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) {
   225         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
   225         SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
   226         return 1;
   226         return 1;
   227     }
   227     }
       
   228     
       
   229     SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
   228 
   230 
   229     /* Print information about the controller */
   231     /* Print information about the controller */
   230     for (i = 0; i < SDL_NumJoysticks(); ++i) {
   232     for (i = 0; i < SDL_NumJoysticks(); ++i) {
   231         const char *name;
   233         const char *name;
   232         const char *description;
   234         const char *description;