mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Initially count the dir for save info size.
Should help #6068, verified by the sizes test and JpcspTrace results.
This commit is contained in:
parent
12c0272cbc
commit
b71b1bbff9
@ -209,9 +209,9 @@ int PSPSaveDialog::Init(int paramAddr)
|
||||
StartFade(true);
|
||||
|
||||
/*INFO_LOG(SCEUTILITY,"Dump Param :");
|
||||
INFO_LOG(SCEUTILITY,"size : %d",param.GetPspParam()->size);
|
||||
INFO_LOG(SCEUTILITY,"language : %d",param.GetPspParam()->language);
|
||||
INFO_LOG(SCEUTILITY,"buttonSwap : %d",param.GetPspParam()->buttonSwap);
|
||||
INFO_LOG(SCEUTILITY,"size : %d",param.GetPspParam()->common.size);
|
||||
INFO_LOG(SCEUTILITY,"language : %d",param.GetPspParam()->common.language);
|
||||
INFO_LOG(SCEUTILITY,"buttonSwap : %d",param.GetPspParam()->common.buttonSwap);
|
||||
INFO_LOG(SCEUTILITY,"result : %d",param.GetPspParam()->common.result);
|
||||
INFO_LOG(SCEUTILITY,"mode : %d",param.GetPspParam()->mode);
|
||||
INFO_LOG(SCEUTILITY,"bind : %d",param.GetPspParam()->bind);
|
||||
|
@ -977,8 +977,21 @@ int SavedataParam::GetSizes(SceUtilitySavedataParam *param)
|
||||
if (param->utilityData.IsValid())
|
||||
{
|
||||
int total_size = 0;
|
||||
total_size += getSizeNormalized(1); // SFO;
|
||||
total_size += getSizeNormalized((u32)param->dataSize == 0 ? 1 : (u32)param->dataSize); // Save Data
|
||||
|
||||
// The directory record itself.
|
||||
// TODO: Account for number of files / actual record size?
|
||||
total_size += getSizeNormalized(1);
|
||||
// Account for the SFO (is this always 1 sector?)
|
||||
total_size += getSizeNormalized(1);
|
||||
// Add the size of the data itself (don't forget encryption overhead.)
|
||||
// This is only added if a filename is specified.
|
||||
if (param->fileName[0] != 0) {
|
||||
if (g_Config.bEncryptSave) {
|
||||
total_size += getSizeNormalized((u32)param->dataSize + 16);
|
||||
} else {
|
||||
total_size += getSizeNormalized((u32)param->dataSize);
|
||||
}
|
||||
}
|
||||
total_size += getSizeNormalized(param->icon0FileData.size);
|
||||
total_size += getSizeNormalized(param->icon1FileData.size);
|
||||
total_size += getSizeNormalized(param->pic1FileData.size);
|
||||
|
Loading…
Reference in New Issue
Block a user