PER FI JA MAPEJA BE ELS BOTONS AL REDEFINIRLOS!

This commit is contained in:
2024-07-07 14:53:26 +02:00
parent ceafe931f1
commit 38dc63ef02
2 changed files with 4 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ void DefineButtons::render()
}
// Comprueba el botón que se ha pulsado
void DefineButtons::doJoystickButtonDown(SDL_JoyButtonEvent *event)
void DefineButtons::doControllerButtonDown(SDL_ControllerButtonEvent *event)
{
int i = input->getJoyIndex(event->which);
@@ -111,8 +111,8 @@ void DefineButtons::checkInput()
// Comprueba los eventos que hay en la cola
while (SDL_PollEvent(&event))
{
if (event.type == SDL_JOYBUTTONDOWN)
doJoystickButtonDown(&event.jbutton);
if (event.type == SDL_CONTROLLERBUTTONDOWN)
doControllerButtonDown(&event.cbutton);
}
}
}