mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 02:00:15 +01:00
GameList: Use sanitized game titles for covers
Fixes covers for games such as dot hack which use characters incompatble with the file system.
This commit is contained in:
1 parent
2b04f0b585
commit
17ac5ffe99
1 file changed
+4
-2
@@ -766,7 +766,8 @@ std::string GameList::GetCoverImagePath(const std::string& path, const std::stri
|
||||
// Last resort, check the game title
|
||||
if (!title.empty())
|
||||
{
|
||||
const std::string cover_filename(title + extension);
|
||||
std::string cover_filename(title + extension);
|
||||
Path::SanitizeFileName(&cover_filename);
|
||||
cover_path = Path::Combine(EmuFolders::Covers, cover_filename);
|
||||
if (FileSystem::FileExists(cover_path.c_str()))
|
||||
return cover_path;
|
||||
@@ -791,6 +792,7 @@ std::string GameList::GetNewCoverImagePathForEntry(const Entry* entry, const cha
|
||||
return existing_filename;
|
||||
}
|
||||
|
||||
const std::string cover_filename(entry->title + extension);
|
||||
std::string cover_filename(entry->title + extension);
|
||||
Path::SanitizeFileName(&cover_filename);
|
||||
return Path::Combine(EmuFolders::Covers, cover_filename);
|
||||
}
|
||||
Reference in new issue
Block a user