forked from jaildesigner-jailgames/jaildoctors_dilemma
fix: controls en el mando
This commit is contained in:
@@ -93,10 +93,16 @@ void Title::handleEvent(const SDL_Event& event) {
|
||||
}
|
||||
|
||||
// Qualsevol botó del comandament al menú principal inicia partida directament
|
||||
// (els bindings ja estan definits, no cal "pulsar 1" amb el teclat).
|
||||
// (els bindings ja estan definits, no cal "pulsar 1" amb el teclat). El botó
|
||||
// BACK queda exclòs perquè es reserva per a EXIT — excepte a emscripten, on
|
||||
// no es pot sortir del joc i BACK pot actuar com a botó genèric d'inici.
|
||||
if (event.type == SDL_EVENT_GAMEPAD_BUTTON_DOWN &&
|
||||
state_ == State::MAIN_MENU &&
|
||||
!is_remapping_keyboard_ && !is_remapping_joystick_) {
|
||||
!is_remapping_keyboard_ && !is_remapping_joystick_
|
||||
#ifndef __EMSCRIPTEN__
|
||||
&& event.gbutton.button != SDL_GAMEPAD_BUTTON_BACK
|
||||
#endif
|
||||
) {
|
||||
handleMainMenuKeyPress(SDLK_1); // PLAY
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user