Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,9 @@ void enterDeepSleep(bool fromTimeout, bool powerOff) {
// Commit to sleeping before goToSleep() runs the outgoing activity's onExit():
// a WiFi activity would otherwise silentRestart() here and reboot instead.
deepSleepInProgress = true;
activityManager.preparePluginSleep();
{
activityManager.preparePluginSleep(); // also the readers' progress save: runs with plugins off
// Plugins off: skip the render lock wait, battery read and book path copy that only feed the SleepEnter event.
if (SETTINGS.pluginsEnabled) {
RenderLock lock;
const std::string book = activityManager.getCurrentBookPath();
pluginevents::prepareSleep(book.c_str(), activityManager.getScreenshotInfo().progressPercent,
Expand Down