patch_manager: Add PatchNSO function

While PatchExeFS operated on the entire directory, this function operates on the uncompressed NSO. Avoids copying decompression code to PatchManager.
This commit is contained in:
Zach Hilman
2018-09-29 22:15:16 -04:00
parent 4c2a94fa94
commit 42fb4e82d3
3 changed files with 104 additions and 0 deletions

View File

@ -34,6 +34,14 @@ public:
// - Game Updates
VirtualDir PatchExeFS(VirtualDir exefs) const;
// Currently tracked NSO patches:
// - IPS
std::vector<u8> PatchNSO(const std::vector<u8>& nso) const;
// Checks to see if PatchNSO() will have any effect given the NSO's build ID.
// Used to prevent expensive copies in NSO loader.
bool HasNSOPatch(const std::array<u8, 0x20>& build_id) const;
// Currently tracked RomFS patches:
// - Game Updates
// - LayeredFS