mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
2b04f0b585
commit
17ac5ffe99
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue