mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-23 00:35:42 +01:00
am: Properly implement GetDisplayVersion
Properly implement IApplicationFunctions::GetDisplayVersion
This commit is contained in:
parent
8e64fb3225
commit
9acd336422
@ -1343,12 +1343,23 @@ void IApplicationFunctions::SetTerminateResult(Kernel::HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetDisplayVersion(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};
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.Push<u64>(1);
|
rb.PushRaw(version_string);
|
||||||
rb.Push<u64>(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user