summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/NANDContentLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/NANDContentLoader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp
index 1204550fab..02a2462ab9 100644
--- a/Source/Core/DiscIO/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/NANDContentLoader.cpp
@@ -161,6 +161,14 @@ bool CNANDContentLoader::IsValid() const
return m_Valid && m_tmd.IsValid();
}
+const SNANDContent* CNANDContentLoader::GetContentByID(u32 id) const
+{
+ const auto iterator = std::find_if(m_Content.begin(), m_Content.end(), [id](const auto& content) {
+ return content.m_metadata.id == id;
+ });
+ return iterator != m_Content.end() ? &*iterator : nullptr;
+}
+
const SNANDContent* CNANDContentLoader::GetContentByIndex(int index) const
{
for (auto& Content : m_Content)