mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 22:35:39 +00:00
GameList: Add GetEntryBySerialAndHash()
This commit is contained in:
parent
1b29212d6c
commit
d8e980887f
|
@ -590,6 +590,17 @@ const GameList::Entry* GameList::GetEntryBySerial(const std::string_view& serial
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GameList::Entry* GameList::GetEntryBySerialAndHash(const std::string_view& serial, u64 hash)
|
||||||
|
{
|
||||||
|
for (const Entry& entry : s_entries)
|
||||||
|
{
|
||||||
|
if (entry.serial == serial && entry.hash == hash)
|
||||||
|
return &entry;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
u32 GameList::GetEntryCount()
|
u32 GameList::GetEntryCount()
|
||||||
{
|
{
|
||||||
return static_cast<u32>(s_entries.size());
|
return static_cast<u32>(s_entries.size());
|
||||||
|
|
|
@ -71,6 +71,7 @@ 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* GetEntryBySerial(const std::string_view& serial);
|
const Entry* GetEntryBySerial(const std::string_view& serial);
|
||||||
|
const Entry* GetEntryBySerialAndHash(const std::string_view& serial, u64 hash);
|
||||||
u32 GetEntryCount();
|
u32 GetEntryCount();
|
||||||
|
|
||||||
bool IsGameListLoaded();
|
bool IsGameListLoaded();
|
||||||
|
|
Loading…
Reference in a new issue