Added a popup notification if PDF manual rendering failed

Also removed two unnecessary navigation scroll sounds on PDF rendering failure
This commit is contained in:
Leon Styhre 2023-07-04 18:07:28 +02:00
parent b60f86ae04
commit 8a6611a6f5
2 changed files with 3 additions and 2 deletions

View file

@ -89,7 +89,6 @@ bool PDFViewer::startPDFViewer(FileData* game)
if (!getDocumentInfo()) {
LOG(LogError) << "PDFViewer: Couldn't load file \"" << mManualPath << "\"";
NavigationSounds::getInstance().playThemeNavigationSound(SCROLLSOUND);
ViewController::getInstance()->stopViewVideos();
return false;
}
@ -99,7 +98,6 @@ bool PDFViewer::startPDFViewer(FileData* game)
for (int i {1}; i <= mPageCount; ++i) {
if (mPages.find(i) == mPages.end()) {
LOG(LogError) << "Couldn't read information for page " << i << ", invalid PDF file?";
NavigationSounds::getInstance().playThemeNavigationSound(SCROLLSOUND);
ViewController::getInstance()->stopViewVideos();
return false;
}

View file

@ -923,6 +923,9 @@ void Window::startPDFViewer(FileData* game)
mRenderPDFViewer = true;
}
else {
queueInfoPopup("ERROR: COULDN'T RENDER PDF FILE", 4000);
}
}
}