From 38c2ac95af814e21e65e2785b276c4f64bfead71 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 5 Oct 2018 08:53:45 -0400 Subject: romfs_factory: Extract packed update setter to new function --- src/core/file_sys/patch_manager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (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 3fc44fb5c..1ac00ebb0 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -206,7 +206,7 @@ VirtualFile PatchManager::PatchRomFS(VirtualFile romfs, u64 ivfc_offset, Content romfs = new_nca->GetRomFS(); } } else if (update_raw != nullptr) { - const auto new_nca = std::make_shared(update, romfs, ivfc_offset); + const auto new_nca = std::make_shared(update_raw, romfs, ivfc_offset); if (new_nca->GetStatus() == Loader::ResultStatus::Success && new_nca->GetRomFS() != nullptr) { LOG_INFO(Loader, " RomFS: Update (PACKED) applied successfully"); @@ -231,7 +231,8 @@ static bool IsDirValidAndNonEmpty(const VirtualDir& dir) { return dir != nullptr && (!dir->GetFiles().empty() || !dir->GetSubdirectories().empty()); } -std::map PatchManager::GetPatchVersionNames(VirtualFile update_raw) const { +std::map> PatchManager::GetPatchVersionNames( + VirtualFile update_raw) const { std::map> out; const auto installed = Service::FileSystem::GetUnionContents(); @@ -253,7 +254,7 @@ std::map PatchManager::GetPatchVersionNames(VirtualFile FormatTitleVersion(meta_ver.get(), TitleVersionFormat::ThreeElements)); } } else if (update_raw != nullptr) { - out[PatchType::Update] = "PACKED"; + out.insert_or_assign("Update", "PACKED"); } } -- cgit v1.2.3