Add opds image download

This commit is contained in:
jpirnay
2026-05-10 20:47:35 +02:00
parent c4b94737fd
commit 80eb889256
8 changed files with 100 additions and 28 deletions
+4 -4
View File
@@ -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;
}
+4 -4
View File
@@ -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};
}
+4 -4
View File
@@ -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;
}