From abe9c0d4385f73c021020d3645be0682fe448de4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 21 Aug 2021 00:01:35 +1000 Subject: [PATCH] GameList: Use display name for exe/psf titles --- src/frontend-common/game_list.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/frontend-common/game_list.cpp b/src/frontend-common/game_list.cpp index 4e82c8c5e..01d8372f7 100644 --- a/src/frontend-common/game_list.cpp +++ b/src/frontend-common/game_list.cpp @@ -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 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; }