From d1a42df121151ca1d2a58e62f754284db438dee8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 28 Nov 2020 02:04:01 +1000 Subject: [PATCH] GameList: Fix cover image detection based on file title --- src/frontend-common/game_list.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend-common/game_list.cpp b/src/frontend-common/game_list.cpp index 7ddbb69a3..84c65c9be 100644 --- a/src/frontend-common/game_list.cpp +++ b/src/frontend-common/game_list.cpp @@ -1170,12 +1170,14 @@ std::string GameList::GetCoverImagePathForEntry(const GameListEntry* entry) cons } // and the file title if it differs - const std::string_view file_title = GetFileNameFromPath(entry->path.c_str()); + const std::string_view file_title = System::GetTitleForPath(entry->path.c_str()); if (!file_title.empty() && entry->title != file_title) { cover_path.Clear(); cover_path.AppendString(g_host_interface->GetUserDirectory().c_str()); cover_path.AppendCharacter(FS_OSPATH_SEPERATOR_CHARACTER); + cover_path.AppendString("covers"); + cover_path.AppendCharacter(FS_OSPATH_SEPERATOR_CHARACTER); cover_path.AppendString(file_title.data(), static_cast(file_title.size())); cover_path.AppendCharacter('.'); cover_path.AppendString(extension);