Skip to content

Commit bdbbd8c

Browse files
committed
GameList: Use raw path for titles and fix internal DB overwrite
1 parent 9beebfc commit bdbbd8c

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

pcsx2/GameList.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,10 @@ bool GameList::ScanFile(std::string path, std::time_t timestamp, std::unique_loc
787787
entry.total_played_time = iter->second.total_played_time;
788788
}
789789

790-
entry.is_favorite = custom_attributes_ini.GetBoolValue(EncodeIniKey(entry.path).c_str(), "Favorited", false);
791-
792-
auto custom_title = custom_attributes_ini.GetOptionalStringValue(EncodeIniKey(entry.path).c_str(), "Title");
793-
794-
if (custom_title)
790+
entry.is_favorite = custom_attributes_ini.GetBoolValue(EncodeIniKey(entry.path).c_str(), "Favorited", false);
791+
792+
auto custom_title = custom_attributes_ini.GetOptionalStringValue(entry.path.c_str(), "Title");
793+
if (custom_title && !custom_title.value().empty())
795794
{
796795
entry.title = std::move(custom_title.value());
797796
}
@@ -1545,7 +1544,7 @@ std::string GameList::GetCustomTitleForPath(const std::string& path)
15451544
std::string ret;
15461545

15471546
std::unique_lock lock(s_mutex);
1548-
const GameList::Entry* entry = GetEntryForPath(EncodeIniKey(path).c_str());
1547+
const GameList::Entry* entry = GetEntryForPath(path.c_str());
15491548
if (entry)
15501549
{
15511550
ret = entry->title;

0 commit comments

Comments
 (0)