GameList: Prioritize file title over serial for covers

This commit is contained in:
TheTechnician27 authored and Ty committed 2025-09-25 18:08:50 -04:00
1 parent 5fcd0f94c2
commit fe565afff0
1 file changed
+10 -10
+10 -10
View File
@@ -1215,16 +1215,7 @@ std::string GameList::GetCoverImagePathForEntry(const Entry* entry)
for (const char* extension : extensions)
{
// Prioritize lookup by serial (Most specific)
if (!entry->serial.empty())
{
const std::string cover_filename(entry->serial + extension);
cover_path = Path::Combine(EmuFolders::Covers, cover_filename);
if (FileSystem::FileExists(cover_path.c_str()))
return cover_path;
}
// Try file title (for modded games or specific like above)
// Prioritize file title since users can change these (e.g. for modded games)
const std::string_view file_title(Path::GetFileTitle(entry->path));
if (!file_title.empty() && entry->title != file_title)
{
@@ -1236,6 +1227,15 @@ std::string GameList::GetCoverImagePathForEntry(const Entry* entry)
return cover_path;
}
// Lookup by serial (most specific)
if (!entry->serial.empty())
{
const std::string cover_filename(entry->serial + extension);
cover_path = Path::Combine(EmuFolders::Covers, cover_filename);
if (FileSystem::FileExists(cover_path.c_str()))
return cover_path;
}
// Last resort, check the game title
if (!entry->title.empty())
{