fix: controls en el mando
This commit is contained in:
@@ -39,9 +39,18 @@ namespace GlobalEvents {
|
||||
}
|
||||
}
|
||||
|
||||
// Marcar polsació de qualsevol botó del comandament (els consumirà GlobalInputs).
|
||||
// Marcar polsació de qualsevol botó del comandament (els consumirà GlobalInputs
|
||||
// per saltar escenes d'attract mode). El botó BACK queda exclòs perquè es
|
||||
// reserva per a l'acció EXIT — excepte a emscripten, on no es pot sortir del
|
||||
// joc i el BACK pot actuar com a botó genèric per saltar escenes.
|
||||
if (event.type == SDL_EVENT_GAMEPAD_BUTTON_DOWN) {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
gamepad_button_pressed_ = true;
|
||||
#else
|
||||
if (event.gbutton.button != SDL_GAMEPAD_BUTTON_BACK) {
|
||||
gamepad_button_pressed_ = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Enrutar eventos de texto a la consola cuando está activa
|
||||
|
||||
Reference in New Issue
Block a user