diff options
author | bunnei <bunneidev@gmail.com> | 2020-05-03 05:35:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-03 05:35:38 +0200 |
commit | 7459215933bc27f9cbcfb260ca8a8b6177e8f918 (patch) | |
tree | 6f6c75b79eec00f676bab4bb3465f7f621163eae /src/core/hle | |
parent | Merge pull request #3811 from ogniK5377/audin-init (diff) | |
parent | Update src/core/hle/service/am/am.cpp (diff) | |
download | yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar.gz yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar.bz2 yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar.lz yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar.xz yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.tar.zst yuzu-7459215933bc27f9cbcfb260ca8a8b6177e8f918.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 17 |
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 9450de6e9..a967e6ef7 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1335,12 +1335,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 { + constexpr 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) { |