working on game controller

This commit is contained in:
2021-08-25 13:34:40 +02:00
parent 36eaf1de4f
commit 3440dea0a5

View File

@@ -261,8 +261,11 @@ bool Input::discoverGameController()
// Open the controller and add it to our list
mGameController = SDL_GameControllerOpen(i);
if (SDL_GameControllerGetAttached(mGameController) == 1)
//connectedControllers.push_back(pad);
//connectedControllers.push_back(pad);
{
found = true;
printf("%s\n", SDL_GameControllerNameForIndex(i));
}
else
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
}