From bcbf5daf0d1a03a1ff47db7daaa6594afd4444a7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 24 Feb 2022 11:22:04 -0800 Subject: [PATCH] Add Xbox One system detection (fixes #368) --- CHANGELIST.md | 1 + MPF.Core/Data/Drive.cs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELIST.md b/CHANGELIST.md index 1cde1eba..167b4c95 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -11,6 +11,7 @@ - Move path normalization to better place - Specifically include Unsafe Nuget package - Update Nuget packages to newest stable +- Add Xbox One system detection ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Core/Data/Drive.cs b/MPF.Core/Data/Drive.cs index 912b9488..737476e2 100644 --- a/MPF.Core/Data/Drive.cs +++ b/MPF.Core/Data/Drive.cs @@ -292,6 +292,17 @@ namespace MPF.Core.Data } catch { } + // Microsoft Xbox One + try + { + if (Directory.Exists(Path.Combine(drivePath, "MSXC")) + && Directory.EnumerateFiles(Path.Combine(drivePath, "MSXC")).Any()) + { + return RedumpSystem.MicrosoftXboxOne; + } + } + catch { } + // Sega Dreamcast if (File.Exists(Path.Combine(drivePath, "IP.BIN"))) {