Skip to content

Commit

Permalink
Improve disc ID detection for old frame dumps.
Browse files Browse the repository at this point in the history
Ran into this looking at issue #6379
  • Loading branch information
hrydgard committed Dec 30, 2023
1 parent d2ebd36 commit de0d82d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit de0d82d

Please sign in to comment.