mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #14801 from unknownbrackets/reporting
Reporting: Calculate CRC for PSN games
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -44,10 +44,13 @@ BlockDevice *constructBlockDevice(FileLoader *fileLoader) {
|
||||
size_t size = fileLoader->ReadAt(0, 1, 4, buffer);
|
||||
if (size == 4 && !memcmp(buffer, "CISO", 4))
|
||||
return new CISOFileBlockDevice(fileLoader);
|
||||
else if (size == 4 && !memcmp(buffer, "\x00PBP", 4))
|
||||
return new NPDRMDemoBlockDevice(fileLoader);
|
||||
else
|
||||
return new FileBlockDevice(fileLoader);
|
||||
if (size == 4 && !memcmp(buffer, "\x00PBP", 4)) {
|
||||
uint32_t psarOffset = 0;
|
||||
size = fileLoader->ReadAt(0x24, 1, 4, &psarOffset);
|
||||
if (size == 4 && psarOffset < fileLoader->FileSize())
|
||||
return new NPDRMDemoBlockDevice(fileLoader);
|
||||
}
|
||||
return new FileBlockDevice(fileLoader);
|
||||
}
|
||||
|
||||
u32 BlockDevice::CalculateCRC(volatile bool *cancel) {
|
||||
|
||||
+1
-2
@@ -107,8 +107,7 @@ namespace Reporting
|
||||
static int CalculateCRCThread() {
|
||||
SetCurrentThreadName("ReportCRC");
|
||||
|
||||
// TODO: Use the blockDevice from pspFileSystem?
|
||||
FileLoader *fileLoader = ConstructFileLoader(crcFilename);
|
||||
FileLoader *fileLoader = ResolveFileLoaderTarget(ConstructFileLoader(crcFilename));
|
||||
BlockDevice *blockDevice = constructBlockDevice(fileLoader);
|
||||
|
||||
u32 crc = 0;
|
||||
|
||||
Reference in new issue
Block a user