From fca12c639c1a164c66aff19a02f7d4484538bc9a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 4 Dec 2022 22:44:59 -0800 Subject: [PATCH] Update CDS PlayJ check --- .../ProtectionType/CactusDataShield.cs | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/BurnOutSharp/ProtectionType/CactusDataShield.cs b/BurnOutSharp/ProtectionType/CactusDataShield.cs index 931e357b..11334744 100644 --- a/BurnOutSharp/ProtectionType/CactusDataShield.cs +++ b/BurnOutSharp/ProtectionType/CactusDataShield.cs @@ -80,23 +80,12 @@ namespace BurnOutSharp.ProtectionType return match; } - // Get the .rsrc section, if it exists - var rsrcSectionRaw = pex.GetLastSectionData(".rsrc"); - if (rsrcSectionRaw != null) - { - var matchers = new List - { - // CactusPJ - // Found in "Volumia!" by Puur (Barcode 7 43218 63282 2) (Discogs Release Code [r795427]). - // Modified version of the PlayJ Music Player specificaly for CDS, as indicated by the About page present when running the executable. - new ContentMatchSet(new byte?[] { 0x43, 0x61, 0x63, 0x74, 0x75, 0x73, 0x50, 0x4A }, "PlayJ Music Player (Cactus Data Shield 200)"), - }; + // Found in "Volumia!" by Puur (Barcode 7 43218 63282 2) (Discogs Release Code [r795427]). + // Modified version of the PlayJ Music Player specificaly for CDS, as indicated by the About page present when running the executable. + var resources = pex.FindGenericResource("CactusPJ"); + if (resources.Any()) + return "PlayJ Music Player (Cactus Data Shield 200)"; - string match = MatchUtil.GetFirstMatch(file, rsrcSectionRaw, matchers, includeDebug); - if (!string.IsNullOrWhiteSpace(match)) - return match; - } - return null; }