Load savestate screenshots in the background

This commit is contained in:
Henrik Rydgård committed 2023-12-13 12:07:23 +01:00
1 parent e5d2e09f02
commit f8927df9a6
6 files changed
+143 -95

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ void AsyncImageFileView::DeviceRestored(Draw::DrawContext *draw) {
void AsyncImageFileView::Draw(UIContext &dc) {
using namespace Draw;
if (!texture_ && !textureFailed_ && !filename_.empty()) {
texture_ = CreateManagedTextureFromFile(dc.GetDrawContext(), filename_.c_str(), DETECT, true);
texture_ = std::unique_ptr<ManagedTexture>(new ManagedTexture(dc.GetDrawContext(), filename_.c_str(), ImageFileType::DETECT, true));
if (!texture_.get())
textureFailed_ = true;
}