summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/patch_manager.h
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2024-01-19 22:37:34 +0100
committert895 <clombardo169@gmail.com>2024-01-20 02:54:50 +0100
commit03fa91ba3c52c0371f0d57ea8a5618feaf3012e7 (patch)
tree740a2a94eff69f5d20b1e7424f8665acbd950939 /src/core/file_sys/patch_manager.h
parentandroid: Use callback to update progress bar dialogs (diff)
downloadyuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.gz
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.bz2
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.lz
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.xz
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.zst
yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.zip
Diffstat (limited to 'src/core/file_sys/patch_manager.h')
-rw-r--r--src/core/file_sys/patch_manager.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/core/file_sys/patch_manager.h b/src/core/file_sys/patch_manager.h
index 03e9c7301..2601b8217 100644
--- a/src/core/file_sys/patch_manager.h
+++ b/src/core/file_sys/patch_manager.h
@@ -26,12 +26,22 @@ class ContentProvider;
class NCA;
class NACP;
+enum class PatchType { Update, DLC, Mod };
+
+struct Patch {
+ bool enabled;
+ std::string name;
+ std::string version;
+ PatchType type;
+ u64 program_id;
+ u64 title_id;
+};
+
// A centralized class to manage patches to games.
class PatchManager {
public:
using BuildID = std::array<u8, 0x20>;
using Metadata = std::pair<std::unique_ptr<NACP>, VirtualFile>;
- using PatchVersionNames = std::map<std::string, std::string, std::less<>>;
explicit PatchManager(u64 title_id_,
const Service::FileSystem::FileSystemController& fs_controller_,
@@ -66,9 +76,8 @@ public:
VirtualFile packed_update_raw = nullptr,
bool apply_layeredfs = true) const;
- // Returns a vector of pairs between patch names and patch versions.
- // i.e. Update 3.2.2 will return {"Update", "3.2.2"}
- [[nodiscard]] PatchVersionNames GetPatchVersionNames(VirtualFile update_raw = nullptr) const;
+ // Returns a vector of patches
+ [[nodiscard]] std::vector<Patch> GetPatches(VirtualFile update_raw = nullptr) const;
// If the game update exists, returns the u32 version field in its Meta-type NCA. If that fails,
// it will fallback to the Meta-type NCA of the base game. If that fails, the result will be