System: Generate hash serials when running PS-EXE

Allows for per-game settings.
This commit is contained in:
Stenzek
2024-05-30 22:21:51 +10:00
parent 25bf2b3adc
commit 7682cd2c10
6 changed files with 75 additions and 36 deletions

View File

@ -155,9 +155,10 @@ bool GameList::GetExeListEntry(const std::string& path, GameList::Entry* entry)
return false;
}
const std::string display_name(FileSystem::GetDisplayNameFromPath(path));
entry->serial.clear();
entry->title = Path::GetFileTitle(display_name);
const System::GameHash hash = System::GetGameHashFromFile(path.c_str());
entry->serial = hash ? System::GetGameHashId(hash) : std::string();
entry->title = Path::GetFileTitle(FileSystem::GetDisplayNameFromPath(path));
entry->region = BIOS::GetPSExeDiscRegion(header);
entry->file_size = ZeroExtend64(file_size);
entry->uncompressed_size = entry->file_size;