working on game controller input
This commit is contained in:
@@ -191,16 +191,16 @@ bool Input::discoverGameController()
|
||||
if (SDL_IsGameController(i))
|
||||
{
|
||||
char *mapping;
|
||||
SDL_Log("Index \'%i\' is a compatible controller, named \'%s\'", i, SDL_GameControllerNameForIndex(i));
|
||||
printf("Index \'%i\' is a compatible controller, named \'%s\'", i, SDL_GameControllerNameForIndex(i));
|
||||
mGameController = SDL_GameControllerOpen(i);
|
||||
mapping = SDL_GameControllerMapping(mGameController);
|
||||
SDL_Log("Controller %i is mapped as \"%s\".", i, mapping);
|
||||
printf("Controller %i is mapped as \"%s\".", i, mapping);
|
||||
SDL_free(mapping);
|
||||
mGameControllerFound = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_Log("Index \'%i\' is not a compatible controller.", i);
|
||||
printf("Index \'%i\' is not a compatible controller.", i);
|
||||
mGameControllerFound = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user