aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/patch_manager.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-06-26 10:26:44 -0400
committerGitHub <noreply@github.com>2019-06-26 10:26:44 -0400
commit4ed2774c26602d6ee1af316da5faf391d377d701 (patch)
treea1ef0e65dfd79f8badde8dcd24014432428c51f8 /src/core/file_sys/patch_manager.cpp
parent221996a19402dd53affa99f45bc888a248d3412f (diff)
parentd10fc2d7277cf075f875fe2831501cb79c50e21a (diff)
Merge pull request #2607 from DarkLordZach/arp-1
glue: Implement arp:w and arp:r services
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
-rw-r--r--src/core/file_sys/patch_manager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp
index da823c37b..a8f80e2c6 100644
--- a/src/core/file_sys/patch_manager.cpp
+++ b/src/core/file_sys/patch_manager.cpp
@@ -493,6 +493,16 @@ std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNam
return out;
}
+std::optional<u32> PatchManager::GetGameVersion() const {
+ const auto& installed = Core::System::GetInstance().GetContentProvider();
+ const auto update_tid = GetUpdateTitleID(title_id);
+ if (installed.HasEntry(update_tid, ContentRecordType::Program)) {
+ return installed.GetEntryVersion(update_tid);
+ }
+
+ return installed.GetEntryVersion(title_id);
+}
+
std::pair<std::unique_ptr<NACP>, VirtualFile> PatchManager::GetControlMetadata() const {
const auto& installed = Core::System::GetInstance().GetContentProvider();