mirror of https://github.com/PCSX2/pcsx2.git
GameList: Add GetEntryByCRC()
This commit is contained in:
parent
444e650711
commit
4f4b14dd4d
|
@ -568,6 +568,17 @@ const GameList::Entry* GameList::GetEntryForPath(const char* path)
|
||||||
return nullptr;
|
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)
|
const GameList::Entry* GameList::GetEntryBySerialAndCRC(const std::string_view& serial, u32 crc)
|
||||||
{
|
{
|
||||||
for (const Entry& entry : m_entries)
|
for (const Entry& entry : m_entries)
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace GameList
|
||||||
std::unique_lock<std::recursive_mutex> GetLock();
|
std::unique_lock<std::recursive_mutex> GetLock();
|
||||||
const Entry* GetEntryByIndex(u32 index);
|
const Entry* GetEntryByIndex(u32 index);
|
||||||
const Entry* GetEntryForPath(const char* path);
|
const Entry* GetEntryForPath(const char* path);
|
||||||
|
const Entry* GetEntryByCRC(u32 crc);
|
||||||
const Entry* GetEntryBySerialAndCRC(const std::string_view& serial, u32 crc);
|
const Entry* GetEntryBySerialAndCRC(const std::string_view& serial, u32 crc);
|
||||||
u32 GetEntryCount();
|
u32 GetEntryCount();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue