mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-27 00:04:45 +00:00
GameInfoCache: Get game and save sizes.
This commit is contained in:
parent
cbd3ae02f1
commit
cf2422002c
@ -196,18 +196,18 @@ public:
|
||||
info_->paramSFOLoaded = true;
|
||||
}
|
||||
|
||||
{
|
||||
ReadFileToString(&umd, "/PSP_GAME/ICON0.PNG", &info_->iconTextureData, &info_->lock);
|
||||
}
|
||||
|
||||
ReadFileToString(&umd, "/PSP_GAME/ICON0.PNG", &info_->iconTextureData, &info_->lock);
|
||||
if (info_->wantBG) {
|
||||
{
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC0.PNG", &info_->pic0TextureData, &info_->lock);
|
||||
}
|
||||
{
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &info_->pic1TextureData, &info_->lock);
|
||||
}
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC0.PNG", &info_->pic0TextureData, &info_->lock);
|
||||
}
|
||||
ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &info_->pic1TextureData, &info_->lock);
|
||||
|
||||
}
|
||||
// probably only want these when we ask for the background image...
|
||||
// should maybe flip the flag to "onlyIcon"
|
||||
if (info_->wantBG) {
|
||||
info_->gameSize = info_->GetGameSizeInBytes();
|
||||
info_->saveDataSize = info_->GetSaveDataSizeInBytes();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,9 @@
|
||||
|
||||
class GameInfo {
|
||||
public:
|
||||
GameInfo() : fileType(FILETYPE_UNKNOWN), iconTexture(NULL), pic0Texture(NULL), pic1Texture(NULL), wantBG(false), paramSFOLoaded(false) {}
|
||||
GameInfo()
|
||||
: fileType(FILETYPE_UNKNOWN), iconTexture(NULL), pic0Texture(NULL), pic1Texture(NULL),
|
||||
wantBG(false), paramSFOLoaded(false), gameSize(0), saveDataSize(0) {}
|
||||
|
||||
bool DeleteGame(); // Better be sure what you're doing when calling this.
|
||||
bool DeleteAllSaveData();
|
||||
@ -75,6 +77,9 @@ public:
|
||||
double timeIconWasLoaded;
|
||||
double timePic0WasLoaded;
|
||||
double timePic1WasLoaded;
|
||||
|
||||
u64 gameSize;
|
||||
u64 saveDataSize;
|
||||
};
|
||||
|
||||
class GameInfoCache {
|
||||
|
Loading…
x
Reference in New Issue
Block a user