Update APT::AppletUtility

This commit is contained in:
wheremyfoodat 2023-08-10 13:41:00 +03:00 committed by GitHub
parent 54ef53bb95
commit 86a6d74218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,6 +96,13 @@ void APTService::appletUtility(u32 messagePointer) {
log("APT::AppletUtility(utility = %d, input size = %x, output size = %x, inputPointer = %08X) (Stubbed)\n", utility, inputSize,
outputSize, inputPointer);
const u32 outputBuffer = messagePointer + 0x104;
if (outputSize >= 1 && utility == 6) {
// TryLockTransition expects a bool indicating success in the output buffer. Set it to true to avoid games panicking (Thanks to Citra)
mem.write8(outputBuffer, true);
}
mem.write32(messagePointer, IPC::responseHeader(0x4B, 2, 2));
mem.write32(messagePointer + 4, Result::Success);
}