mirror of
https://github.com/BernardoGiordano/Checkpoint
synced 2024-11-14 21:57:13 +00:00
This should fix the remaining caching issues
This commit is contained in:
parent
77b5097177
commit
a54fcb8834
1 changed files with 11 additions and 7 deletions
|
@ -79,15 +79,19 @@ void calculateTitleDBHash(u8* hash)
|
|||
AM_GetTitleCount(MEDIATYPE_SD, &titleCount);
|
||||
if (Configuration::getInstance().nandSaves()) {
|
||||
AM_GetTitleCount(MEDIATYPE_NAND, &nandCount);
|
||||
u64 buf[titleCount + nandCount];
|
||||
AM_GetTitleList(&titlesRead, MEDIATYPE_SD, titleCount, buf);
|
||||
AM_GetTitleList(&nandTitlesRead, MEDIATYPE_NAND, nandCount, buf + titlesRead * sizeof(u64));
|
||||
sha256(hash, (u8*)buf, (titleCount + nandCount) * sizeof(u64));
|
||||
std::vector<u64> ordered;
|
||||
ordered.reserve(titleCount + nandCount);
|
||||
AM_GetTitleList(&titlesRead, MEDIATYPE_SD, titleCount, ordered.data());
|
||||
AM_GetTitleList(&nandTitlesRead, MEDIATYPE_NAND, nandCount, ordered.data() + titlesRead * sizeof(u64));
|
||||
sort(ordered.begin(), ordered.end());
|
||||
sha256(hash, (u8*)ordered.data(), (titleCount + nandCount) * sizeof(u64));
|
||||
}
|
||||
else {
|
||||
u64 buf[titleCount];
|
||||
AM_GetTitleList(&titlesRead, MEDIATYPE_SD, titleCount, buf);
|
||||
sha256(hash, (u8*)buf, titleCount * sizeof(u64));
|
||||
std::vector<u64> ordered;
|
||||
ordered.reserve(titleCount);
|
||||
AM_GetTitleList(&titlesRead, MEDIATYPE_SD, titleCount, ordered.data());
|
||||
sort(ordered.begin(), ordered.end());
|
||||
sha256(hash, (u8*)ordered.data(), titleCount * sizeof(u64));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue