Add opds image download
This commit is contained in:
@@ -328,16 +328,16 @@ void EpubReaderActivity::loop() {
|
||||
|
||||
if (ev.type == ButtonEventManager::PressType::Short) {
|
||||
if ((ev.button == MappedInputManager::Button::PageBack && SETTINGS.btnShortPageBack == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageBack)) ||
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageBack)) ||
|
||||
(ev.button == MappedInputManager::Button::Left && SETTINGS.btnShortLeft == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Left))) {
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Left))) {
|
||||
delayedPrevTurn = true;
|
||||
continue;
|
||||
}
|
||||
if ((ev.button == MappedInputManager::Button::PageForward && SETTINGS.btnShortPageForward == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageForward)) ||
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageForward)) ||
|
||||
(ev.button == MappedInputManager::Button::Right && SETTINGS.btnShortRight == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Right))) {
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Right))) {
|
||||
delayedNextTurn = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -95,16 +95,16 @@ inline PageTurnResult detectPageTurn(const MappedInputManager& input) {
|
||||
// because the button event system delays short events until the double-click window expires.
|
||||
using BA = CrossPointSettings::BUTTON_ACTION;
|
||||
const bool prev = (SETTINGS.btnShortPageBack == BA::BTN_DEFAULT &&
|
||||
!ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageBack) &&
|
||||
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageBack) &&
|
||||
input.wasReleased(MappedInputManager::Button::PageBack)) ||
|
||||
(SETTINGS.btnShortLeft == BA::BTN_DEFAULT &&
|
||||
!ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Left) &&
|
||||
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Left) &&
|
||||
input.wasReleased(MappedInputManager::Button::Left));
|
||||
const bool next = (SETTINGS.btnShortPageForward == BA::BTN_DEFAULT &&
|
||||
!ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageForward) &&
|
||||
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageForward) &&
|
||||
input.wasReleased(MappedInputManager::Button::PageForward)) ||
|
||||
(SETTINGS.btnShortRight == BA::BTN_DEFAULT &&
|
||||
!ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Right) &&
|
||||
!globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Right) &&
|
||||
input.wasReleased(MappedInputManager::Button::Right));
|
||||
return {prev, next};
|
||||
}
|
||||
|
||||
@@ -102,16 +102,16 @@ void XtcReaderActivity::loop() {
|
||||
|
||||
if (ev.type == ButtonEventManager::PressType::Short) {
|
||||
if ((ev.button == MappedInputManager::Button::PageBack && SETTINGS.btnShortPageBack == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageBack)) ||
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageBack)) ||
|
||||
(ev.button == MappedInputManager::Button::Left && SETTINGS.btnShortLeft == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Left))) {
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Left))) {
|
||||
delayedPrevTurn = true;
|
||||
continue;
|
||||
}
|
||||
if ((ev.button == MappedInputManager::Button::PageForward && SETTINGS.btnShortPageForward == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::PageForward)) ||
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::PageForward)) ||
|
||||
(ev.button == MappedInputManager::Button::Right && SETTINGS.btnShortRight == BA::BTN_DEFAULT &&
|
||||
ButtonEventManager::hasDoubleAction(MappedInputManager::Button::Right))) {
|
||||
globalButtonEvents().hasDoubleAction(MappedInputManager::Button::Right))) {
|
||||
delayedNextTurn = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user