GameInfoCache: Get game and save sizes.

This commit is contained in:
Henrik Rydgard 2013-06-09 11:54:03 +02:00
parent cbd3ae02f1
commit cf2422002c
2 changed files with 16 additions and 11 deletions

View File

@ -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();
}
}

View File

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