fix: correct behaviour for prev/next side buttons (#2373)

## Summary

* **What is the goal of this PR?** fix #2365
This commit is contained in:
Uri Tauber
2026-06-18 13:13:35 -04:00
committed by GitHub
parent 121c0690b0
commit ff1951c715
+3 -2
View File
@@ -43,8 +43,9 @@ inline PageTurnResult detectPageTurn(const MappedInputManager& input) {
const bool usePress = SETTINGS.longPressButtonBehavior == SETTINGS.OFF; const bool usePress = SETTINGS.longPressButtonBehavior == SETTINGS.OFF;
const bool tiltNext = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedForward(); const bool tiltNext = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedForward();
const bool tiltPrev = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedBack(); const bool tiltPrev = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedBack();
const auto prevButton = MappedInputManager::Button::NavPrevious; const bool swapFront = input.isNavDirectionSwapped();
const auto nextButton = MappedInputManager::Button::NavNext; const auto prevButton = swapFront ? MappedInputManager::Button::Right : MappedInputManager::Button::Left;
const auto nextButton = swapFront ? MappedInputManager::Button::Left : MappedInputManager::Button::Right;
const bool prev = const bool prev =
tiltPrev || tiltPrev ||
(usePress ? (input.wasPressed(MappedInputManager::Button::PageBack) || input.wasPressed(prevButton)) (usePress ? (input.wasPressed(MappedInputManager::Button::PageBack) || input.wasPressed(prevButton))