| 159 | } |
| 160 | |
| 161 | void InitGameController() |
| 162 | { |
| 163 | if (CurrentJoystickIndex() == -1) |
| 164 | return; |
| 165 | const SDL_JoystickGUID guid = SDL_JoystickGetGUID(CurrentJoystick()); |
| 166 | SDL_Log("Opening gamepad %d: %s", CurrentJoystickIndex(), SDL_GameControllerMappingForGUID(guid)); |
| 167 | current_game_controller = SDL_GameControllerOpen(CurrentJoystickIndex()); |
| 168 | if (current_game_controller == nullptr) |
| 169 | SDL_Log(SDL_GetError()); |
| 170 | } |
| 171 | |
| 172 | } // namespace dvl |
| 173 | #endif |
no test coverage detected