diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 5c79e600..f12bb31e 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -73,8 +72,7 @@ int32_t pngSleepSeek(PNGFILE* pFile, int32_t pos) { return f->seek(pos); } -bool renderPngSleepScreen(const std::string& filename, GfxRenderer& renderer, - const BookOverlayInfo& overlayInfo) { +bool renderPngSleepScreen(const std::string& filename, GfxRenderer& renderer, const BookOverlayInfo& overlayInfo) { constexpr size_t MIN_FREE_HEAP = 60 * 1024; // PNG decoder ~42 KB + overhead if (ESP.getFreeHeap() < MIN_FREE_HEAP) { LOG_ERR("SLP", "Not enough heap for PNG sleep image: %s", filename.c_str()); @@ -353,7 +351,8 @@ void SleepActivity::renderCustomSleepScreen() const { } if (Storage.openFileForRead("SLP", "/sleep.png", explicitSleepFile)) { explicitSleepFile.close(); - const BookOverlayInfo resolvedOverlayInfo = shouldLoadOverlayInfo ? getBookOverlayInfo(APP_STATE.openEpubPath) : overlayInfo; + const BookOverlayInfo resolvedOverlayInfo = + shouldLoadOverlayInfo ? getBookOverlayInfo(APP_STATE.openEpubPath) : overlayInfo; if (renderPngSleepScreen("/sleep.png", renderer, resolvedOverlayInfo)) { LOG_DBG("SLP", "Loading explicit custom sleep image: /sleep.png"); return;