mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 06:35:40 +12:00
Update APT::AppletUtility (#168)
* Update APT::AppletUtility * Fix derp * Update apt.cpp * Update apt.cpp * Update apt.cpp
This commit is contained in:
parent
54ef53bb95
commit
4b2c0f42ea
1 changed files with 18 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
#include "ipc.hpp"
|
||||
#include "kernel.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace APTCommands {
|
||||
enum : u32 {
|
||||
GetLockHandle = 0x00010040,
|
||||
|
@ -94,10 +96,24 @@ void APTService::appletUtility(u32 messagePointer) {
|
|||
u32 outputSize = mem.read32(messagePointer + 12);
|
||||
u32 inputPointer = mem.read32(messagePointer + 20);
|
||||
|
||||
log("APT::AppletUtility(utility = %d, input size = %x, output size = %x, inputPointer = %08X) (Stubbed)\n", utility, inputSize,
|
||||
outputSize, inputPointer);
|
||||
log("APT::AppletUtility(utility = %d, input size = %x, output size = %x, inputPointer = %08X) (Stubbed)\n", utility, inputSize, outputSize,
|
||||
inputPointer);
|
||||
|
||||
std::vector<u8> out(outputSize);
|
||||
const u32 outputBuffer = mem.read32(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)
|
||||
out[0] = true;
|
||||
}
|
||||
|
||||
mem.write32(messagePointer, IPC::responseHeader(0x4B, 2, 2));
|
||||
mem.write32(messagePointer + 4, 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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue