add page turn on pwrbtn press to xtc reader
This commit is contained in:
parent
78893e293c
commit
b6a6711fc2
@ -151,11 +151,10 @@ void EpubReaderActivity::loop() {
|
|||||||
|
|
||||||
const bool prevReleased = mappedInput.wasReleased(MappedInputManager::Button::PageBack) ||
|
const bool prevReleased = mappedInput.wasReleased(MappedInputManager::Button::PageBack) ||
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::Left);
|
mappedInput.wasReleased(MappedInputManager::Button::Left);
|
||||||
const bool nextReleased =
|
const bool nextReleased = mappedInput.wasReleased(MappedInputManager::Button::PageForward) ||
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::PageForward) ||
|
(SETTINGS.shortPwrBtn == CrossPointSettings::SHORT_PWRBTN::PAGE_TURN &&
|
||||||
(SETTINGS.shortPwrBtn == CrossPointSettings::SHORT_PWRBTN::PAGE_TURN &&
|
mappedInput.wasReleased(MappedInputManager::Button::Power)) ||
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::Power) && mappedInput.getHeldTime() < goHomeMs) ||
|
mappedInput.wasReleased(MappedInputManager::Button::Right);
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::Right);
|
|
||||||
|
|
||||||
if (!prevReleased && !nextReleased) {
|
if (!prevReleased && !nextReleased) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -112,6 +112,8 @@ void XtcReaderActivity::loop() {
|
|||||||
const bool prevReleased = mappedInput.wasReleased(MappedInputManager::Button::PageBack) ||
|
const bool prevReleased = mappedInput.wasReleased(MappedInputManager::Button::PageBack) ||
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::Left);
|
mappedInput.wasReleased(MappedInputManager::Button::Left);
|
||||||
const bool nextReleased = mappedInput.wasReleased(MappedInputManager::Button::PageForward) ||
|
const bool nextReleased = mappedInput.wasReleased(MappedInputManager::Button::PageForward) ||
|
||||||
|
(SETTINGS.shortPwrBtn == CrossPointSettings::SHORT_PWRBTN::PAGE_TURN &&
|
||||||
|
mappedInput.wasReleased(MappedInputManager::Button::Power)) ||
|
||||||
mappedInput.wasReleased(MappedInputManager::Button::Right);
|
mappedInput.wasReleased(MappedInputManager::Button::Right);
|
||||||
|
|
||||||
if (!prevReleased && !nextReleased) {
|
if (!prevReleased && !nextReleased) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user