From 8fe1e6efa2fe21abc9e8e1f83ecbc5a78389e37b Mon Sep 17 00:00:00 2001 From: lizzie Date: Tue, 4 Aug 2026 01:50:54 +0200 Subject: [core/file_sys] implement IApplicationFunctions::GetPseudoDeviceId; common PatchManager::GetNACP for base|updates (#4159) a bit of refactoring so there's less code duplication... probably a good idea to make it a lambda anyways maybe this is why QLauncher didn't have proper DLCs and updates? either way "GetPseudoDeviceId" is now implemented (still stubbed) with a proper hash instead of just 0 Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4159 Reviewed-by: Maufeat Reviewed-by: CamilleLaVey --- src/core/file_sys/patch_manager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/file_sys/patch_manager.cpp') diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 80372ec94e..6ae4679054 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -1156,4 +1156,14 @@ PatchManager::Metadata PatchManager::ParseControlNCA(const NCA& nca) const { return {std::move(nacp), icon_file}; } + +[[nodiscard]] PatchManager::Metadata PatchManager::GetMetadataFromBaseOrUpdate(Core::System& system, u64 application_id) noexcept { + const FileSys::PatchManager pm{application_id, system.GetFileSystemController(), system.GetContentProvider()}; + auto metadata = pm.GetControlMetadata(); + if (metadata.first != nullptr) + return metadata; + const FileSys::PatchManager pm_update{FileSys::GetUpdateTitleID(application_id), system.GetFileSystemController(), system.GetContentProvider()}; + return pm_update.GetControlMetadata(); +} + } // namespace FileSys -- cgit v1.2.3