GameList: Use display name for exe/psf titles

This commit is contained in:
Connor McLaughlin 2021-08-21 00:01:35 +10:00
parent 7eceee6a20
commit abe9c0d438

View file

@ -89,8 +89,9 @@ bool GameList::GetExeListEntry(const std::string& path, GameListEntry* entry)
return false;
}
const std::string display_name(FileSystem::GetDisplayNameFromPath(path));
entry->code.clear();
entry->title = FileSystem::GetFileTitleFromPath(path);
entry->title = FileSystem::StripExtension(display_name);
entry->region = BIOS::GetPSExeDiscRegion(header);
entry->total_size = ZeroExtend64(file_size);
entry->type = GameListEntryType::PSExe;
@ -126,9 +127,14 @@ bool GameList::GetPsfListEntry(const std::string& path, GameListEntry* entry)
std::optional<std::string> title(file.GetTagString("title"));
if (title.has_value())
{
entry->title += title.value();
}
else
entry->title += FileSystem::GetFileTitleFromPath(path);
{
const std::string display_name(FileSystem::GetDisplayNameFromPath(path));
entry->title += FileSystem::StripExtension(display_name);
}
return true;
}