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
commit7e480c312fac883019b199c3ed869bdfc9b4ac89 (patch)
treea1ef0e65dfd79f8badde8dcd24014432428c51f8 /src/core/file_sys/patch_manager.cpp
parenta866b5864b67f8a5f303a71ca7d46e6427f5bc7b (diff)
parent12105d8909dfeaee9340878f00c4bd309c5808ce (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 da823c37bb..a8f80e2c63 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();