ja guarda la configuració del mando amb els boto-triggers
This commit is contained in:
@@ -152,6 +152,12 @@ void DefineButtons::doControllerAxisMotion(const SDL_GamepadAxisEvent &event) {
|
||||
updateWindowMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// Detectar liberación del trigger para llamar checkEnd()
|
||||
if (!l2_is_pressed_now && l2_was_pressed_) {
|
||||
checkEnd();
|
||||
}
|
||||
|
||||
l2_was_pressed_ = l2_is_pressed_now;
|
||||
|
||||
} else if (event.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) {
|
||||
@@ -166,6 +172,12 @@ void DefineButtons::doControllerAxisMotion(const SDL_GamepadAxisEvent &event) {
|
||||
updateWindowMessage();
|
||||
}
|
||||
}
|
||||
|
||||
// Detectar liberación del trigger para llamar checkEnd()
|
||||
if (!r2_is_pressed_now && r2_was_pressed_) {
|
||||
checkEnd();
|
||||
}
|
||||
|
||||
r2_was_pressed_ = r2_is_pressed_now;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user