From 6327a298477d4b91d9dae477225f7f5090bb51d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 25 Feb 2017 01:03:22 +0100 Subject: IOS/ES: Implement ES_Export* ioctlvs This should allow channels to be copied to the SD properly. --- Source/Core/DiscIO/NANDContentLoader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp') 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) -- cgit v1.2.3