Show unknown.png regardless of PARAM.SFO when an ISO lacks the file.

It's better than showing a black rectangle with nothing in it for broken or homebrew ISOs.
This commit is contained in:
The Dax 2014-03-06 08:16:19 -05:00
parent 56b2b2e534
commit 8efd67280d

View file

@ -362,7 +362,6 @@ handleELF:
info_->paramSFO.ReadSFO((const u8 *)paramSFOcontents.data(), paramSFOcontents.size());
info_->ParseParamSFO();
ReadFileToString(&umd, "/PSP_GAME/ICON0.PNG", &info_->iconTextureData, &info_->lock);
if (info_->wantBG) {
ReadFileToString(&umd, "/PSP_GAME/PIC0.PNG", &info_->pic0TextureData, &info_->lock);
}
@ -370,7 +369,10 @@ handleELF:
} else {
// Fall back to the filename for title if ISO is broken
info_->title = gamePath_;
// Fall back to unknown icon if ISO is broken, override is allowed though
}
// Fall back to unknown icon if ISO is broken/is a homebrew ISO, override is allowed though
if (!ReadFileToString(&umd, "/PSP_GAME/ICON0.PNG", &info_->iconTextureData, &info_->lock)) {
size_t sz;
uint8_t *contents = VFSReadFile("unknown.png", &sz);
DEBUG_LOG(LOADER, "Loading unknown.png because no icon was found");