1.3.0.35-dev2-cpr-vcodex-steroids
Screensaver & Sleep Enhancements
Overview
This release adds separate image directories and ordering for the reader screensaver, the ability to replace the power-button long-press with a screensaver while reading, and a major rework of transparent PNG compositing for both the screensaver and the sleep screen.
New Features
Separate screensaver directories
- General screensaver folder and sequential/shuffle order (settings → Screensaver).
- Reader screensaver folder and sequential/shuffle order (settings → Screensaver (reading)), used only when the screensaver is triggered from inside a book.
- Dedicated settings UI for both directories with live preview and mode selection.
Replace sleep with screensaver (reading only)
- When enabled (
screenSaverReplaceSleep), a long press on the power button while reading a book launches the screensaver instead of going to deep sleep. - The underlying reader activity is kept on the stack; pressing a wake button returns to the book immediately.
- Battery-minimum checks are respected: if the battery is below the configured threshold, normal deep sleep is used even when the replacement is enabled.
- Outside reading activities the power button behaves as before (normal sleep).
Per-image-ordering per mode
- Each screensaver mode (general / reader) has its own shuffle/sequential setting, so the user can have, for example, sequential images in the general screensaver but shuffled images while reading.
Removal of screensaver from the reader context menu
- The “Launch screensaver” menu item has been removed from the reader's overflow menu. The screensaver from the reader is now only accessible via the long-press power button (when the replacement option is active).
Transparent PNG Background Handling
Unified snapshot approach (both sleep and screensaver)
- Before any sleep screen or screensaver is drawn, the current frame buffer is saved to a file on the SD card (
/.crosspoint/screensaver-caller.tmpfor the screensaver,/.crosspoint/last_reader_page.binfor the sleep cycle). - On every image change (screensaver slideshow or sleep cycle), this snapshot is restored to the frame buffer before the new transparent PNG is drawn. This guarantees that transparent areas always show the original caller content (reader page, home, library, settings, …) instead of accumulating residues from previous images.
In-line with the proven sleep-cycle pattern
- The cache saving and restoring logic has been unified between the screensaver activity and the sleep cycle. Both now follow the same pattern that the existing cycle-screensaver-on-tap feature already used successfully.
Memory Optimisations
Heap-friendly PNG decoder allocation
- SD card font caches are explicitly cleared before PNG decoding during sleep entry, maximising contiguous free space for the ~44 KB decoder.
- The
MemoryBudgetcheck indrawTransparentPnghas been relaxed: instead of immediately returningfalsewhen the heuristic suggests low memory, the decoder attempts allocation anyway (which may still succeed inside the available headroom).
File-based frame buffer cache
- Replaced the in-memory
std::vector<uint8_t>snapshot (48 KB) with a file on the SD card. This removes persistent heap pressure during the entire screensaver session and leaves more space for the PNG decoder.
Exit & Transition Improvements
No forced full refresh on screensaver exit
- Exiting the screensaver (both from the app and from reading) no longer forces a
FULL_REFRESH. The underlying activity re-renders with its natural refresh mode, making the transition as fast as a normal screen change.
Immediate underlying activity render
- On screensaver exit, an immediate render notification is sent so the home page or reader appears without a visible blank gap.