Browse Source

Fix a small memory leak in game_controller.cpp

pull/1278/head
Gleb Mazovetskiy 5 years ago committed by Anders Jenbo
parent
commit
fb2e76889f
  1. 4
      SourceX/controls/devices/game_controller.cpp

4
SourceX/controls/devices/game_controller.cpp

@ -166,7 +166,9 @@ void GameController::Add(int joystick_index)
controllers_->push_back(result);
const SDL_JoystickGUID guid = SDL_JoystickGetGUID(sdl_joystick);
SDL_Log("Opened game controller with mapping:\n%s", SDL_GameControllerMappingForGUID(guid));
char *mapping = SDL_GameControllerMappingForGUID(guid);
SDL_Log("Opened game controller with mapping:\n%s", mapping);
SDL_free(mapping);
}
void GameController::Remove(SDL_JoystickID instance_id)

Loading…
Cancel
Save