A couple of fixes

This commit is contained in:
jpirnay
2026-05-11 23:02:27 +02:00
parent 5b3f1ad200
commit 4982f803a7
7 changed files with 35 additions and 23 deletions
+15 -12
View File
@@ -113,18 +113,21 @@ inline PageTurnResult detectPageTurn(const MappedInputManager& input) {
if (tiltNegative) {
applyTiltAction(SETTINGS.tiltNegativeAction);
}
const bool prev = tiltPrev || ((SETTINGS.btnShortPageBack == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageBack) &&
input.wasReleased(MappedInputManager::Button::PageBack)) ||
(SETTINGS.btnShortLeft == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Left) &&
input.wasReleased(MappedInputManager::Button::Left)));
const bool next = tiltNext || ((SETTINGS.btnShortPageForward == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageForward) &&
input.wasReleased(MappedInputManager::Button::PageForward)) ||
(SETTINGS.btnShortRight == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Right) &&
input.wasReleased(MappedInputManager::Button::Right)));
const bool prevButtonReleased = (SETTINGS.btnShortPageBack == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageBack) &&
input.wasReleased(MappedInputManager::Button::PageBack)) ||
(SETTINGS.btnShortLeft == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Left) &&
input.wasReleased(MappedInputManager::Button::Left));
const bool nextButtonReleased = (SETTINGS.btnShortPageForward == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageForward) &&
input.wasReleased(MappedInputManager::Button::PageForward)) ||
(SETTINGS.btnShortRight == BA::BTN_DEFAULT &&
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Right) &&
input.wasReleased(MappedInputManager::Button::Right));
const bool prev = tiltPrev || prevButtonReleased;
const bool next = tiltNext || nextButtonReleased;
return {prev, next};
}