diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-04 15:42:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 15:42:37 +0200 |
commit | f85f2b372807b9785bfe30b2b1e2f342d58bddf6 (patch) | |
tree | 90fbcbdc532c106407503531e38c736471272e1e /src/core/file_sys/patch_manager.h | |
parent | Merge pull request #1434 from DarkLordZach/dlc-edge-case (diff) | |
parent | nso: Optimize loading of IPS patches (diff) | |
download | yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar.gz yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar.bz2 yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar.lz yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar.xz yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.tar.zst yuzu-f85f2b372807b9785bfe30b2b1e2f342d58bddf6.zip |
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. |