mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 03:00:36 +01:00
GameList: Prioritize file title over serial for covers
This commit is contained in:
1 parent
5fcd0f94c2
commit
fe565afff0
1 file changed
+10
-10
+10
-10
@@ -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())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user