Skip to content

Commit ddaac7e

Browse files
committed
GameList: Use save title for cover image lookup
1 parent 0867dec commit ddaac7e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/core/game_list.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,15 +1199,16 @@ void GameList::CreateDiscSetEntries(const std::vector<std::string>& excluded_pat
11991199

12001200
std::string GameList::GetCoverImagePathForEntry(const Entry* entry)
12011201
{
1202-
return GetCoverImagePath(entry->path, entry->serial, entry->title);
1202+
return GetCoverImagePath(entry->path, entry->serial, entry->GetSaveTitle());
12031203
}
12041204

12051205
static std::string GetFullCoverPath(std::string_view filename, std::string_view extension)
12061206
{
12071207
return fmt::format("{}" FS_OSPATH_SEPARATOR_STR "{}.{}", EmuFolders::Covers, filename, extension);
12081208
}
12091209

1210-
std::string GameList::GetCoverImagePath(const std::string& path, const std::string& serial, const std::string& title)
1210+
std::string GameList::GetCoverImagePath(const std::string_view path, const std::string_view serial,
1211+
const std::string_view title)
12111212
{
12121213
static constexpr const std::array extensions = {"jpg", "jpeg", "png", "webp"};
12131214
std::string ret;

src/core/game_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ std::string FormatTimestamp(std::time_t timestamp);
143143
TinyString FormatTimespan(std::time_t timespan, bool long_format = false);
144144

145145
std::string GetCoverImagePathForEntry(const Entry* entry);
146-
std::string GetCoverImagePath(const std::string& path, const std::string& serial, const std::string& title);
146+
std::string GetCoverImagePath(const std::string_view path, const std::string_view serial, const std::string_view title);
147147
std::string GetNewCoverImagePathForEntry(const Entry* entry, const char* new_filename, bool use_serial);
148148

149149
/// Returns a list of (title, entry) for entries matching serials. Titles will match the gamedb title,

0 commit comments

Comments
 (0)