fix: correct behaviour for prev/next side buttons (#2373)
## Summary * **What is the goal of this PR?** fix #2365
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user