Merge pull request #44 from jpirnay/chore-mutex

chore: Add a couple of mutex locks
This commit is contained in:
jpirnay
2026-04-08 19:48:44 +02:00
committed by GitHub
10 changed files with 82 additions and 34 deletions
+4 -1
View File
@@ -58,7 +58,10 @@ void EpubReaderActivity::onEnter() {
// Configure screen orientation based on settings
// NOTE: This affects layout math and must be applied before any render calls.
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
{
RenderLock lock(*this);
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
}
epub->setupCacheDir();
+6 -3
View File
@@ -125,9 +125,12 @@ void ReaderActivity::onEnter() {
if (isImageFile(initialBookPath)) {
onGoToBmpViewer(initialBookPath);
} else if (isXtcFile(initialBookPath)) {
renderer.clearScreen();
renderer.drawCenteredText(UI_12_FONT_ID, 300, tr(STR_LOADING), true, EpdFontFamily::BOLD);
renderer.displayBuffer();
{
RenderLock lock(*this);
renderer.clearScreen();
renderer.drawCenteredText(UI_12_FONT_ID, 300, tr(STR_LOADING), true, EpdFontFamily::BOLD);
renderer.displayBuffer();
}
auto xtc = loadXtc(initialBookPath);
if (!xtc) {
+4 -1
View File
@@ -92,7 +92,10 @@ void TxtReaderActivity::onEnter() {
return;
}
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
{
RenderLock lock(*this);
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
}
txt->setupCacheDir();