fix: swap reader menu navigation direction in CCW/inverted (#2321) (#2341)

Co-authored-by: Uri Tauber <uritaube@gmail.com>
This commit is contained in:
Ronin
2026-06-15 22:19:34 +03:00
committed by GitHub
co-authored by Uri Tauber
parent 55a56914d7
commit 02bab00be6
5 changed files with 45 additions and 18 deletions
+2 -5
View File
@@ -43,11 +43,8 @@ inline PageTurnResult detectPageTurn(const MappedInputManager& input) {
const bool usePress = SETTINGS.longPressButtonBehavior == SETTINGS.OFF;
const bool tiltNext = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedForward();
const bool tiltPrev = SETTINGS.tiltPageTurn && halTiltSensor.wasTiltedBack();
const bool swapFront =
SETTINGS.frontButtonFollowOrientation && (SETTINGS.orientation == CrossPointSettings::INVERTED ||
SETTINGS.orientation == CrossPointSettings::LANDSCAPE_CCW);
const auto prevButton = swapFront ? MappedInputManager::Button::Right : MappedInputManager::Button::Left;
const auto nextButton = swapFront ? MappedInputManager::Button::Left : MappedInputManager::Button::Right;
const auto prevButton = MappedInputManager::Button::NavPrevious;
const auto nextButton = MappedInputManager::Button::NavNext;
const bool prev =
tiltPrev ||
(usePress ? (input.wasPressed(MappedInputManager::Button::PageBack) || input.wasPressed(prevButton))