summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-04-29 14:13:56 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-04-29 14:13:56 +0200
commit9acd336422a0d29d9ee80e93e5f323cfafa87faa (patch)
treebcb4bcfad1f0ff9dc7172bcdee909c7d24de5f59
parentMerge pull request #3771 from benru/dump-romfs-with-updates (diff)
downloadyuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar.gz
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar.bz2
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar.lz
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar.xz
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.tar.zst
yuzu-9acd336422a0d29d9ee80e93e5f323cfafa87faa.zip
-rw-r--r--src/core/hle/service/am/am.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 5695d2521..276a3fc0c 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1343,12 +1343,23 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
}
void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
- LOG_WARNING(Service_AM, "(STUBBED) called");
+ LOG_DEBUG(Service_AM, "called");
+
+ std::array<u8, 0x10> version_string{};
+
+ FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
+ const auto res = pm.GetControlMetadata();
+ if (res.first != nullptr) {
+ const auto& version = res.first->GetVersionString();
+ std::copy(version.begin(), version.end(), version_string.begin());
+ } else {
+ const u128 default_version = {1, 0};
+ std::memcpy(version_string.data(), default_version.data(), sizeof(u128));
+ }
IPC::ResponseBuilder rb{ctx, 6};
rb.Push(RESULT_SUCCESS);
- rb.Push<u64>(1);
- rb.Push<u64>(0);
+ rb.PushRaw(version_string);
}
void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {