summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/patch_manager.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-05 14:53:45 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-05 14:53:51 +0200
commit38c2ac95af814e21e65e2785b276c4f64bfead71 (patch)
tree513d2b50eeb2dc24f709c7ca109b5ce5bd17d6ed /src/core/file_sys/patch_manager.cpp
parentpatch_manager: Add support for NSP packed updates (diff)
downloadyuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.gz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.bz2
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.lz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.xz
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.tar.zst
yuzu-38c2ac95af814e21e65e2785b276c4f64bfead71.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/patch_manager.cpp7
1 files changed, 4 insertions, 3 deletions
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<NCA>(update, romfs, ivfc_offset);
+ const auto new_nca = std::make_shared<NCA>(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<PatchType, std::string> PatchManager::GetPatchVersionNames(VirtualFile update_raw) const {
+std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNames(
+ VirtualFile update_raw) const {
std::map<std::string, std::string, std::less<>> out;
const auto installed = Service::FileSystem::GetUnionContents();
@@ -253,7 +254,7 @@ std::map<PatchType, std::string> PatchManager::GetPatchVersionNames(VirtualFile
FormatTitleVersion(meta_ver.get(), TitleVersionFormat::ThreeElements));
}
} else if (update_raw != nullptr) {
- out[PatchType::Update] = "PACKED";
+ out.insert_or_assign("Update", "PACKED");
}
}