Merge pull request #1836 from ggrtk/pbp

CDImagePBP: Log error message when skipping encrypted files
This commit is contained in:
Connor McLaughlin 2021-03-19 01:52:35 +10:00 committed by GitHub
commit 57ee9242f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -370,7 +370,10 @@ bool CDImagePBP::Open(const char* filename)
// Ignore encrypted files // Ignore encrypted files
if (disc_table[0] == 0x44475000) // "\0PGD" if (disc_table[0] == 0x44475000) // "\0PGD"
{
Log_ErrorPrint("Encrypted PBP images are not supported");
return false; return false;
}
// Convert relative offsets to absolute offsets for available discs // Convert relative offsets to absolute offsets for available discs
for (u32 i = 0; i < DISC_TABLE_NUM_ENTRIES; i++) for (u32 i = 0; i < DISC_TABLE_NUM_ENTRIES; i++)
@ -416,7 +419,10 @@ bool CDImagePBP::Open(const char* filename)
return false; return false;
if (pgd_magic == 0x44475000) // "\0PGD" if (pgd_magic == 0x44475000) // "\0PGD"
{
Log_ErrorPrint("Encrypted PBP images are not supported");
return false; return false;
}
// Read in the TOC // Read in the TOC
if (fseek(m_file, iso_header_start + 0x800, SEEK_SET) != 0) if (fseek(m_file, iso_header_start + 0x800, SEEK_SET) != 0)