From 747ac4ea3bda5bedcd511923d61b9be1f4834283 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 25 Jan 2024 20:53:21 -0500 Subject: [PATCH] Detect Photo CD --- CHANGELIST.md | 1 + MPF.Core/Data/Drive.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELIST.md b/CHANGELIST.md index d2cbea11..2eba6dbd 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -21,6 +21,7 @@ - Normalise Disc Titles in Submission Info (Deterous) - Fix information pulling for CleanRip and UIC - Add UMD handling for the disc info window +- Detect Photo CD ### 3.0.3 (2023-12-04) diff --git a/MPF.Core/Data/Drive.cs b/MPF.Core/Data/Drive.cs index be49e03a..86968c3c 100644 --- a/MPF.Core/Data/Drive.cs +++ b/MPF.Core/Data/Drive.cs @@ -500,6 +500,21 @@ namespace MPF.Core.Data } catch { } + // Photo CD + try + { + if (Directory.Exists(Path.Combine(this.Name, "PHOTO_CD")) +#if NET20 || NET35 + && Directory.GetFiles(Path.Combine(this.Name, "PHOTO_CD")).Any()) +#else + && Directory.EnumerateFiles(Path.Combine(this.Name, "PHOTO_CD")).Any()) +#endif + { + return RedumpSystem.PhotoCD; + } + } + catch { } + // VCD try {