From d7e71543f76e57c94e7fccca95db798739420cf3 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 8 Jan 2022 16:12:48 -0800 Subject: [PATCH] UI: Use comparison screenshot as frame dump icon. This makes it easier to tell a big list apart. --- UI/GameInfoCache.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 11789eeec8..a4e81f6624 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -506,6 +506,22 @@ handleELF: break; } + case IdentifiedFileType::PPSSPP_GE_DUMP: + { + std::lock_guard guard(info_->lock); + + // Let's use the comparison screenshot as an icon, if it exists. + Path screenshotPath = gamePath_.WithReplacedExtension(".ppdmp", ".png"); + if (File::Exists(screenshotPath)) { + if (File::ReadFileToString(false, screenshotPath, info_->icon.data)) { + info_->icon.dataLoaded = true; + } else { + ERROR_LOG(G3D, "Error loading screenshot data: '%s'", screenshotPath.c_str()); + } + } + break; + } + case IdentifiedFileType::PSP_DISC_DIRECTORY: { info_->fileType = IdentifiedFileType::PSP_ISO;