mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Make it easy to get the SND0.AT3 data.
This commit is contained in:
1 parent
a6436d04f5
commit
d5ddf4c438
2 files changed
+19
No files matched your search
@@ -308,6 +308,13 @@ public:
|
||||
info_->pic1DataLoaded = true;
|
||||
}
|
||||
}
|
||||
if (info_->wantFlags & GAMEINFO_WANTSND) {
|
||||
if (pbp.GetSubFileSize(PBP_SND0_AT3) > 0) {
|
||||
lock_guard lock(info_->lock);
|
||||
pbp.GetSubFileAsString(PBP_SND0_AT3, &info_->sndFileData);
|
||||
info_->sndDataLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -354,6 +361,10 @@ handleELF:
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &info_->pic1TextureData, &info_->lock);
|
||||
info_->pic1DataLoaded = true;
|
||||
}
|
||||
if (info_->wantFlags & GAMEINFO_WANTSND) {
|
||||
ReadFileToString(&umd, "/PSP_GAME/SND0.AT3", &info_->sndFileData, &info_->lock);
|
||||
info_->pic1DataLoaded = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FILETYPE_PSP_ISO:
|
||||
@@ -382,6 +393,10 @@ handleELF:
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &info_->pic1TextureData, &info_->lock);
|
||||
info_->pic1DataLoaded = true;
|
||||
}
|
||||
if (info_->wantFlags & GAMEINFO_WANTSND) {
|
||||
ReadFileToString(&umd, "/PSP_GAME/SND0.AT3", &info_->sndFileData, &info_->lock);
|
||||
info_->pic1DataLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to unknown icon if ISO is broken/is a homebrew ISO, override is allowed though
|
||||
|
||||
@@ -45,6 +45,7 @@ enum GameRegion {
|
||||
enum GameInfoWantFlags {
|
||||
GAMEINFO_WANTBG = 0x01,
|
||||
GAMEINFO_WANTSIZE = 0x02,
|
||||
GAMEINFO_WANTSND = 0x04,
|
||||
};
|
||||
|
||||
// TODO: Need to fix c++11 still on Symbian and use std::atomic<bool> instead.
|
||||
@@ -133,6 +134,8 @@ public:
|
||||
std::string pic1TextureData;
|
||||
Texture *pic1Texture;
|
||||
|
||||
std::string sndFileData;
|
||||
|
||||
int wantFlags;
|
||||
|
||||
double lastAccessedTime;
|
||||
@@ -146,6 +149,7 @@ public:
|
||||
CompletionFlag iconDataLoaded;
|
||||
CompletionFlag pic0DataLoaded;
|
||||
CompletionFlag pic1DataLoaded;
|
||||
CompletionFlag sndDataLoaded;
|
||||
|
||||
u64 gameSize;
|
||||
u64 saveDataSize;
|
||||
|
||||
Reference in new issue
Block a user