Load savestate screenshots in the background

This commit is contained in:
Henrik Rydgård
2023-12-13 12:07:23 +01:00
parent e5d2e09f02
commit f8927df9a6
6 changed files with 143 additions and 95 deletions
+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;
}