Fix issue that causes ELFs to not display among recents anymore

This commit is contained in:
Henrik Rydgard 2013-04-13 22:39:19 +02:00
parent 09e58eadd3
commit f85a904d5c
3 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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,6 +37,7 @@ 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..)

View file

@ -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;