mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-23 23:05:39 +01:00
patch_manager: Add support for NSP packed updates
Reads as Update (NSP) in add-ons
This commit is contained in:
parent
cf7aba4817
commit
5acaeb04c4
@ -209,7 +209,7 @@ VirtualFile PatchManager::PatchRomFS(VirtualFile romfs, u64 ivfc_offset, Content
|
||||
const auto new_nca = std::make_shared<NCA>(update, romfs, ivfc_offset);
|
||||
if (new_nca->GetStatus() == Loader::ResultStatus::Success &&
|
||||
new_nca->GetRomFS() != nullptr) {
|
||||
LOG_INFO(Loader, " RomFS: Update (XCI) applied successfully");
|
||||
LOG_INFO(Loader, " RomFS: Update (PACKED) applied successfully");
|
||||
romfs = new_nca->GetRomFS();
|
||||
}
|
||||
}
|
||||
@ -253,7 +253,7 @@ std::map<PatchType, std::string> PatchManager::GetPatchVersionNames(VirtualFile
|
||||
FormatTitleVersion(meta_ver.get(), TitleVersionFormat::ThreeElements));
|
||||
}
|
||||
} else if (update_raw != nullptr) {
|
||||
out[PatchType::Update] = "XCI";
|
||||
out[PatchType::Update] = "PACKED";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,14 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager,
|
||||
if (kv.second.empty()) {
|
||||
out.append(fmt::format("{}\n", kv.first).c_str());
|
||||
} else {
|
||||
out.append(fmt::format("{} ({})\n", kv.first, kv.second).c_str());
|
||||
auto ver = kv.second;
|
||||
|
||||
// Display container name for packed updates
|
||||
if (ver == "PACKED" && kv.first == FileSys::PatchType::Update)
|
||||
ver = Loader::GetFileTypeString(loader.GetFileType());
|
||||
|
||||
out.append(
|
||||
fmt::format("{} ({})\n", FileSys::FormatPatchTypeName(kv.first), ver).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user