diff options
| author | bunnei <bunneidev@gmail.com> | 2018-10-04 09:42:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-04 09:42:37 -0400 |
| commit | f85f2b372807b9785bfe30b2b1e2f342d58bddf6 (patch) | |
| tree | 90fbcbdc532c106407503531e38c736471272e1e /src/core/file_sys/patch_manager.h | |
| parent | cf3a6dd4a175cfc18a856b071ceff9c5e4833eca (diff) | |
| parent | 215b65fe75810b72bb76ae8dbb75ea59ac16f13f (diff) | |
Merge pull request #1415 from DarkLordZach/ips
file_sys: Add support for loading IPS patches
Diffstat (limited to 'src/core/file_sys/patch_manager.h')
| -rw-r--r-- | src/core/file_sys/patch_manager.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/file_sys/patch_manager.h b/src/core/file_sys/patch_manager.h index 3a2a9d212..6a864ec43 100644 --- a/src/core/file_sys/patch_manager.h +++ b/src/core/file_sys/patch_manager.h @@ -24,14 +24,6 @@ enum class TitleVersionFormat : u8 { std::string FormatTitleVersion(u32 version, TitleVersionFormat format = TitleVersionFormat::ThreeElements); -enum class PatchType { - Update, - LayeredFS, - DLC, -}; - -std::string FormatPatchTypeName(PatchType type); - // A centralized class to manage patches to games. class PatchManager { public: @@ -42,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 @@ -49,8 +49,8 @@ public: ContentRecordType type = ContentRecordType::Program) const; // Returns a vector of pairs between patch names and patch versions. - // i.e. Update v80 will return {Update, 80} - std::map<PatchType, std::string> GetPatchVersionNames() const; + // i.e. Update 3.2.2 will return {"Update", "3.2.2"} + std::map<std::string, std::string, std::less<>> GetPatchVersionNames() const; // Given title_id of the program, attempts to get the control data of the update and parse it, // falling back to the base control data. |
