mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 07:35:41 +00:00
GameList: Use display name for exe/psf titles
This commit is contained in:
parent
7eceee6a20
commit
abe9c0d438
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue