fix: Fix coverRendered flag (#1154)

## Summary

* **What is the goal of this PR?** During low memory situations (which I
encounterde a lot during my recent bugfixing activities) a cover was
considered rendered even if the buffer could not be stored.
* **What changes are included?** Proper assignment of flag logic

## Additional Context
-

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
jpirnay
2026-02-25 10:15:30 +01:00
committed by GitHub
parent 128eb614a6
commit f2fbdccd53
3 changed files with 3 additions and 3 deletions

View File

@@ -424,7 +424,7 @@ void BaseTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std:
// Store the buffer with cover image for fast navigation // Store the buffer with cover image for fast navigation
coverBufferStored = storeCoverBuffer(); coverBufferStored = storeCoverBuffer();
coverRendered = true; coverRendered = coverBufferStored; // Only consider it rendered if we successfully stored the buffer
// First render: if selected, draw selection indicators now // First render: if selected, draw selection indicators now
if (bookSelected) { if (bookSelected) {

View File

@@ -79,7 +79,7 @@ void Lyra3CoversTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, con
} }
coverBufferStored = storeCoverBuffer(); coverBufferStored = storeCoverBuffer();
coverRendered = true; coverRendered = coverBufferStored; // Only consider it rendered if we successfully stored the buffer
} }
for (int i = 0; i < std::min(static_cast<int>(recentBooks.size()), Lyra3CoversMetrics::values.homeRecentBooksCount); for (int i = 0; i < std::min(static_cast<int>(recentBooks.size()), Lyra3CoversMetrics::values.homeRecentBooksCount);

View File

@@ -464,7 +464,7 @@ void LyraTheme::drawRecentBookCover(GfxRenderer& renderer, Rect rect, const std:
} }
coverBufferStored = storeCoverBuffer(); coverBufferStored = storeCoverBuffer();
coverRendered = true; coverRendered = coverBufferStored; // Only consider it rendered if we successfully stored the buffer
} }
bool bookSelected = (selectorIndex == 0); bool bookSelected = (selectorIndex == 0);