From 12ff343206095630bda23e7b87bc45eb5e7954fe Mon Sep 17 00:00:00 2001
From: Albert Liu <45282415+ggrtk@users.noreply.github.com>
Date: Wed, 17 Mar 2021 20:24:04 -0700
Subject: [PATCH] CDImagePBP: Log error message when skipping encrypted files

---
 src/common/cd_image_pbp.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

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