mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-14 02:00:15 +01:00
GameList: Add GetEntryByCRC()
This commit is contained in:
1 parent
444e650711
commit
4f4b14dd4d
2 files changed
+12
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user