mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix issue that causes ELFs to not display among recents anymore
This commit is contained in:
parent
09e58eadd3
commit
f85a904d5c
3 changed files with 9 additions and 4 deletions
|
@ -69,7 +69,7 @@ public:
|
||||||
PBPReader pbp(gamePath_.c_str());
|
PBPReader pbp(gamePath_.c_str());
|
||||||
if (!pbp.IsValid())
|
if (!pbp.IsValid())
|
||||||
return;
|
return;
|
||||||
|
info_->fileType = FILETYPE_PSP_PBP;
|
||||||
// First, PARAM.SFO.
|
// First, PARAM.SFO.
|
||||||
size_t sfoSize;
|
size_t sfoSize;
|
||||||
u8 *sfoData = pbp.GetSubFile(PBP_PARAM_SFO, &sfoSize);
|
u8 *sfoData = pbp.GetSubFile(PBP_PARAM_SFO, &sfoSize);
|
||||||
|
@ -100,8 +100,10 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (endsWith(gamePath_, ".elf") || endsWith(gamePath_, ".prx")) {
|
} else if (endsWith(gamePath_, ".elf") || endsWith(gamePath_, ".prx")) {
|
||||||
|
info_->fileType = FILETYPE_PSP_ELF;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
info_->fileType = FILETYPE_PSP_ISO;
|
||||||
SequentialHandleAllocator handles;
|
SequentialHandleAllocator handles;
|
||||||
// Let's assume it's an ISO.
|
// Let's assume it's an ISO.
|
||||||
// TODO: This will currently read in the whole directory tree. Not really necessary for just a
|
// TODO: This will currently read in the whole directory tree. Not really necessary for just a
|
||||||
|
|
|
@ -24,10 +24,12 @@
|
||||||
#include "thread/prioritizedworkqueue.h"
|
#include "thread/prioritizedworkqueue.h"
|
||||||
#include "gfx/texture.h"
|
#include "gfx/texture.h"
|
||||||
#include "Core/ELF/ParamSFO.h"
|
#include "Core/ELF/ParamSFO.h"
|
||||||
|
#include "Core/Loaders.h"
|
||||||
|
|
||||||
|
|
||||||
class GameInfo {
|
class GameInfo {
|
||||||
public:
|
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.
|
// Hold this when reading or writing from the GameInfo.
|
||||||
// Don't need to hold it when just passing around the pointer,
|
// Don't need to hold it when just passing around the pointer,
|
||||||
// and obviously also not when creating it and holding the only pointer
|
// and obviously also not when creating it and holding the only pointer
|
||||||
|
@ -35,6 +37,7 @@ public:
|
||||||
recursive_mutex lock;
|
recursive_mutex lock;
|
||||||
|
|
||||||
std::string title; // for easy access, also available in paramSFO.
|
std::string title; // for easy access, also available in paramSFO.
|
||||||
|
EmuFileType fileType;
|
||||||
ParamSFOData paramSFO;
|
ParamSFOData paramSFO;
|
||||||
|
|
||||||
// Pre read the data, create a texture the next time (GL thread..)
|
// Pre read the data, create a texture the next time (GL thread..)
|
||||||
|
|
|
@ -268,7 +268,7 @@ void MenuScreen::render() {
|
||||||
// This might create a texture so we must flush first.
|
// This might create a texture so we must flush first.
|
||||||
UIFlush();
|
UIFlush();
|
||||||
GameInfo *ginfo = g_gameInfoCache.GetInfo(g_Config.recentIsos[i], false);
|
GameInfo *ginfo = g_gameInfoCache.GetInfo(g_Config.recentIsos[i], false);
|
||||||
if (ginfo) {
|
if (ginfo && ginfo->fileType != FILETYPE_PSP_ELF) {
|
||||||
u32 color;
|
u32 color;
|
||||||
if (ginfo->iconTexture == 0) {
|
if (ginfo->iconTexture == 0) {
|
||||||
color = 0;
|
color = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue