src/joystick/SDL_gamecontroller.c
changeset 10632 e5f5afc9f3fb
parent 10609 d702ecbd8ba7
child 10661 74b42fb2a9e4
equal deleted inserted replaced
10631:29871de88287 10632:e5f5afc9f3fb
   673             SDL_free(pControllerMapping->mapping);
   673             SDL_free(pControllerMapping->mapping);
   674             pControllerMapping->mapping = pchMapping;
   674             pControllerMapping->mapping = pchMapping;
   675             pControllerMapping->priority = priority;
   675             pControllerMapping->priority = priority;
   676             /* refresh open controllers */
   676             /* refresh open controllers */
   677             SDL_PrivateGameControllerRefreshMapping(pControllerMapping);
   677             SDL_PrivateGameControllerRefreshMapping(pControllerMapping);
       
   678         } else {
       
   679             SDL_free(pchName);
       
   680             SDL_free(pchMapping);
   678         }
   681         }
   679         *existing = SDL_TRUE;
   682         *existing = SDL_TRUE;
   680     } else {
   683     } else {
   681         pControllerMapping = SDL_malloc(sizeof(*pControllerMapping));
   684         pControllerMapping = SDL_malloc(sizeof(*pControllerMapping));
   682         if (!pControllerMapping) {
   685         if (!pControllerMapping) {