working on game controller
This commit is contained in:
@@ -261,8 +261,11 @@ bool Input::discoverGameController()
|
|||||||
// Open the controller and add it to our list
|
// Open the controller and add it to our list
|
||||||
mGameController = SDL_GameControllerOpen(i);
|
mGameController = SDL_GameControllerOpen(i);
|
||||||
if (SDL_GameControllerGetAttached(mGameController) == 1)
|
if (SDL_GameControllerGetAttached(mGameController) == 1)
|
||||||
//connectedControllers.push_back(pad);
|
//connectedControllers.push_back(pad);
|
||||||
|
{
|
||||||
found = true;
|
found = true;
|
||||||
|
printf("%s\n", SDL_GameControllerNameForIndex(i));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
|
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user