PER FI JA MAPEJA BE ELS BOTONS AL REDEFINIRLOS!
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user