mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-12 17:34:33 +00:00
GameList: Use save title for cover image lookup
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user