mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-08-08 09:08:43 +00:00
Update apt.cpp
This commit is contained in:
parent
4df6c83068
commit
49566c33a1
1 changed files with 9 additions and 3 deletions
|
@ -94,18 +94,24 @@ void APTService::appletUtility(u32 messagePointer) {
|
||||||
u32 outputSize = mem.read32(messagePointer + 12);
|
u32 outputSize = mem.read32(messagePointer + 12);
|
||||||
u32 inputPointer = mem.read32(messagePointer + 20);
|
u32 inputPointer = mem.read32(messagePointer + 20);
|
||||||
|
|
||||||
log("APT::AppletUtility(utility = %d, input size = %x, output size = %x, inputPointer = %08X) (Stubbed)\n", utility, inputSize,
|
log("APT::AppletUtility(utility = %d, input size = %x, output size = %x, inputPointer = %08X) (Stubbed)\n", utility, inputSize, outputSize,
|
||||||
outputSize, inputPointer);
|
inputPointer);
|
||||||
|
|
||||||
|
std::vector<u8> out(outputSize);
|
||||||
const u32 outputBuffer = mem.read32(messagePointer + 0x104);
|
const u32 outputBuffer = mem.read32(messagePointer + 0x104);
|
||||||
|
|
||||||
if (outputSize >= 1 && utility == 6) {
|
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)
|
// 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);
|
out[0] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mem.write32(messagePointer, IPC::responseHeader(0x4B, 2, 2));
|
mem.write32(messagePointer, IPC::responseHeader(0x4B, 2, 2));
|
||||||
mem.write32(messagePointer + 4, Result::Success);
|
mem.write32(messagePointer + 4, Result::Success);
|
||||||
mem.write32(messagePointer + 8, Result::Success);
|
mem.write32(messagePointer + 8, Result::Success);
|
||||||
|
|
||||||
|
for (u32 i = 0; i < outputSize; i++) {
|
||||||
|
mem.write8(outputBuffer + i, out[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void APTService::preloadLibraryApplet(u32 messagePointer) {
|
void APTService::preloadLibraryApplet(u32 messagePointer) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue