feat(runtime): add CHD discs and mod-owned loading modes

This commit is contained in:
Matthew Stanley
2026-08-03 22:32:10 -07:00
parent 5959ef2fdd
commit 67757efac4
25 changed files with 940 additions and 69 deletions
+5
View File
@@ -18,6 +18,7 @@ namespace {
const char* const kImageExtensions[] = { ".bin", ".img", ".iso" };
bool is_cue(const fs::path& p) { return path_has_extension_ci(p, ".cue"); }
bool is_chd(const fs::path& p) { return path_has_extension_ci(p, ".chd"); }
bool is_raw_image(const fs::path& p) {
for (const char* ext : kImageExtensions) {
@@ -121,6 +122,10 @@ DiscPathResolution resolve_disc_path(const fs::path& picked) {
if (r.picked.empty()) return r;
// CHD is already a complete image + table of contents. It must not be
// upgraded to a same-stem cue or treated as that cue's raw payload.
if (is_chd(r.picked)) return r;
if (is_cue(r.picked)) {
const CueSheet sheet = parse_cue_sheet(r.picked);
if (sheet.usable()) {