From de0d82d020058673e0d4c73ed44835899e6aae70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 30 Dec 2023 22:06:52 +0100 Subject: [PATCH] Improve disc ID detection for old frame dumps. Ran into this looking at issue #6379 --- Core/System.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/System.cpp b/Core/System.cpp index 7b157e7fa340..8e800b747eeb 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -234,7 +234,7 @@ bool DiscIDFromGEDumpPath(const Path &path, FileLoader *fileLoader, std::string // Fall back to using the filename. std::string filename = path.GetFilename(); // Could be more discerning, but hey.. - if (filename.size() > 10 && filename[0] == 'U' && filename[9] == '_') { + if (filename.size() > 10 && (filename[0] == 'U' || filename[0] == 'N') && filename[9] == '_') { *id = filename.substr(0, 9); return true; } else { @@ -290,7 +290,7 @@ bool CPU_Init(std::string *errorString, FileLoader *loadedFile) { } break; case IdentifiedFileType::PPSSPP_GE_DUMP: - // Try to grab the disc ID from the filenameor GE dump. + // Try to grab the disc ID from the filename or GE dump. if (DiscIDFromGEDumpPath(filename, loadedFile, &geDumpDiscID)) { // Store in SFO, otherwise it'll generate a fake disc ID. g_paramSFO.SetValue("DISC_ID", geDumpDiscID, 16);