Improved menu class

This commit is contained in:
2021-08-30 20:58:57 +02:00
parent 74c08884ae
commit 22ca349171
5 changed files with 156 additions and 180 deletions

View File

@@ -21,7 +21,8 @@ Input::Input()
// Destructor
Input::~Input()
{
SDL_GameControllerClose(mGameController);
//SDL_GameControllerClose(mGameController);
//if (mGameController)
mGameController = nullptr;
}
@@ -183,5 +184,8 @@ bool Input::gameControllerFound()
// Obten el nombre de un mando de juego
std::string Input::getControllerName(int index)
{
return mControllerNames[index];
if (mNumGamepads > 0)
return mControllerNames[index];
else
return "";
}