Override */
| 162 | } |
| 163 | |
| 164 | /* Override */ char *SDL_GameControllerMapping( SDL_GameController * gamecontroller ) |
| 165 | { |
| 166 | LOG(LL_TRACE, LCF_SDL | LCF_JOYSTICK, "%s call with id %d", __func__, gamecontroller?*reinterpret_cast<int*>(gamecontroller):-1); |
| 167 | |
| 168 | if (!gamecontroller) |
| 169 | return NULL; |
| 170 | |
| 171 | int* gcid = reinterpret_cast<int*>(gamecontroller); |
| 172 | |
| 173 | if (*gcid < 0 || *gcid >= Global::shared_config.nb_controllers) |
| 174 | return NULL; |
| 175 | |
| 176 | /* Check if controller is available */ |
| 177 | if (gcids[*gcid] == -1) |
| 178 | return NULL; |
| 179 | |
| 180 | /* Return the mapping of my own xbox 360 controller. |
| 181 | * The game is supposed to free the char*, so we must |
| 182 | * allocate it. */ |
| 183 | return duplicateMapping(); |
| 184 | } |
| 185 | |
| 186 | /* Override */ char *SDL_GameControllerMappingForDeviceIndex(int joystick_index) |
| 187 | { |
no test coverage detected