mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
UI: Display save state screenshots as icons.
This way the list is not just a bunch of words, if you have a lot of save states. Like me.
This commit is contained in:
1 parent
43218ea953
commit
21a15e4728
2 files changed
+15
-2
No files matched your search
@@ -443,6 +443,14 @@ handleELF:
|
||||
|
||||
case FILETYPE_PPSSPP_SAVESTATE:
|
||||
{
|
||||
// Let's use the screenshot as an icon, too.
|
||||
std::string screenshotPath = ReplaceAll(gamePath_, ".ppst", ".jpg");
|
||||
lock_guard guard(info_->lock);
|
||||
if (File::Exists(screenshotPath)) {
|
||||
if (readFileToString(false, screenshotPath.c_str(), info_->iconTextureData)) {
|
||||
info_->iconDataLoaded = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -709,7 +717,7 @@ again:
|
||||
void GameInfoCache::SetupTexture(GameInfo *info, std::string &textureData, Thin3DContext *thin3d, Thin3DTexture *&tex, double &loadTime) {
|
||||
if (textureData.size()) {
|
||||
if (!tex) {
|
||||
tex = thin3d->CreateTextureFromFileData((const uint8_t *)textureData.data(), (int)textureData.size(), T3DImageType::PNG);
|
||||
tex = thin3d->CreateTextureFromFileData((const uint8_t *)textureData.data(), (int)textureData.size(), T3DImageType::DETECT);
|
||||
if (tex) {
|
||||
loadTime = time_now_d();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user