GameList: Add GetEntryByCRC()

This commit is contained in:
Connor McLaughlin authored and refractionpcsx2 committed 2022-03-14 15:26:19 +00:00
1 parent 444e650711
commit 4f4b14dd4d
2 files changed
+12

No files matched your search

+11
View File
@@ -568,6 +568,17 @@ const GameList::Entry* GameList::GetEntryForPath(const char* path)
return nullptr;
}
const GameList::Entry* GameList::GetEntryByCRC(u32 crc)
{
for (const Entry& entry : m_entries)
{
if (entry.crc == crc)
return &entry;
}
return nullptr;
}
const GameList::Entry* GameList::GetEntryBySerialAndCRC(const std::string_view& serial, u32 crc)
{
for (const Entry& entry : m_entries)
+1
View File
@@ -80,6 +80,7 @@ namespace GameList
std::unique_lock<std::recursive_mutex> GetLock();
const Entry* GetEntryByIndex(u32 index);
const Entry* GetEntryForPath(const char* path);
const Entry* GetEntryByCRC(u32 crc);
const Entry* GetEntryBySerialAndCRC(const std::string_view& serial, u32 crc);
u32 GetEntryCount();