From f85a904d5c463778502ecdca31b45dd80ee611e7 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 13 Apr 2013 22:39:19 +0200 Subject: [PATCH] Fix issue that causes ELFs to not display among recents anymore --- UI/GameInfoCache.cpp | 4 +++- UI/GameInfoCache.h | 7 +++++-- UI/MenuScreens.cpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index ae45e96550..6e0e2357bb 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -69,7 +69,7 @@ public: PBPReader pbp(gamePath_.c_str()); if (!pbp.IsValid()) return; - + info_->fileType = FILETYPE_PSP_PBP; // First, PARAM.SFO. size_t sfoSize; u8 *sfoData = pbp.GetSubFile(PBP_PARAM_SFO, &sfoSize); @@ -100,8 +100,10 @@ public: } } } else if (endsWith(gamePath_, ".elf") || endsWith(gamePath_, ".prx")) { + info_->fileType = FILETYPE_PSP_ELF; return; } else { + info_->fileType = FILETYPE_PSP_ISO; SequentialHandleAllocator handles; // Let's assume it's an ISO. // TODO: This will currently read in the whole directory tree. Not really necessary for just a diff --git a/UI/GameInfoCache.h b/UI/GameInfoCache.h index ebbb9c0b67..e17e815208 100644 --- a/UI/GameInfoCache.h +++ b/UI/GameInfoCache.h @@ -24,10 +24,12 @@ #include "thread/prioritizedworkqueue.h" #include "gfx/texture.h" #include "Core/ELF/ParamSFO.h" +#include "Core/Loaders.h" + class GameInfo { public: - GameInfo() : iconTexture(NULL), pic0Texture(NULL), pic1Texture(NULL) {} + GameInfo() : fileType(FILETYPE_UNKNOWN), iconTexture(NULL), pic0Texture(NULL), pic1Texture(NULL) {} // Hold this when reading or writing from the GameInfo. // Don't need to hold it when just passing around the pointer, // and obviously also not when creating it and holding the only pointer @@ -35,8 +37,9 @@ public: recursive_mutex lock; std::string title; // for easy access, also available in paramSFO. + EmuFileType fileType; ParamSFOData paramSFO; - + // Pre read the data, create a texture the next time (GL thread..) std::string iconTextureData; Texture *iconTexture; diff --git a/UI/MenuScreens.cpp b/UI/MenuScreens.cpp index e42f5dab80..25831ce3cf 100644 --- a/UI/MenuScreens.cpp +++ b/UI/MenuScreens.cpp @@ -268,7 +268,7 @@ void MenuScreen::render() { // This might create a texture so we must flush first. UIFlush(); GameInfo *ginfo = g_gameInfoCache.GetInfo(g_Config.recentIsos[i], false); - if (ginfo) { + if (ginfo && ginfo->fileType != FILETYPE_PSP_ELF) { u32 color; if (ginfo->iconTexture == 0) { color = 0;