GameList: Use save title for cover image lookup

This commit is contained in:
Stenzek
2025-09-01 20:22:56 +10:00
parent 0867decc87
commit ddaac7eb4c
2 changed files with 4 additions and 3 deletions

View File

@@ -1199,7 +1199,7 @@ void GameList::CreateDiscSetEntries(const std::vector<std::string>& excluded_pat
std::string GameList::GetCoverImagePathForEntry(const Entry* entry)
{
return GetCoverImagePath(entry->path, entry->serial, entry->title);
return GetCoverImagePath(entry->path, entry->serial, entry->GetSaveTitle());
}
static std::string GetFullCoverPath(std::string_view filename, std::string_view extension)
@@ -1207,7 +1207,8 @@ static std::string GetFullCoverPath(std::string_view filename, std::string_view
return fmt::format("{}" FS_OSPATH_SEPARATOR_STR "{}.{}", EmuFolders::Covers, filename, extension);
}
std::string GameList::GetCoverImagePath(const std::string& path, const std::string& serial, const std::string& title)
std::string GameList::GetCoverImagePath(const std::string_view path, const std::string_view serial,
const std::string_view title)
{
static constexpr const std::array extensions = {"jpg", "jpeg", "png", "webp"};
std::string ret;

View File

@@ -143,7 +143,7 @@ std::string FormatTimestamp(std::time_t timestamp);
TinyString FormatTimespan(std::time_t timespan, bool long_format = false);
std::string GetCoverImagePathForEntry(const Entry* entry);
std::string GetCoverImagePath(const std::string& path, const std::string& serial, const std::string& title);
std::string GetCoverImagePath(const std::string_view path, const std::string_view serial, const std::string_view title);
std::string GetNewCoverImagePathForEntry(const Entry* entry, const char* new_filename, bool use_serial);
/// Returns a list of (title, entry) for entries matching serials. Titles will match the gamedb title,