mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 12:10:59 +12:00
Make APT::GetLockHandle fail to skip aptInit
This commit is contained in:
parent
6154a360c6
commit
5bc8c9d671
6 changed files with 33 additions and 4 deletions
|
@ -1,7 +1,30 @@
|
|||
#include "services/apt.hpp"
|
||||
|
||||
namespace APTCommands {
|
||||
enum : u32 {
|
||||
GetLockHandle = 0x00010040
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
Failure = 0xFFFFFFFF
|
||||
};
|
||||
}
|
||||
|
||||
void APTService::reset() {}
|
||||
|
||||
void APTService::handleSyncRequest(u32 messagePointer) {
|
||||
Helpers::panic("APT service requested");
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case APTCommands::GetLockHandle: getLockHandle(messagePointer); break;
|
||||
default: Helpers::panic("APT service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void APTService::getLockHandle(u32 messagePointer) {
|
||||
printf("APT: getLockHandle (Failure)\n");
|
||||
mem.write32(messagePointer + 4, Result::Failure); // Result code
|
||||
mem.write32(messagePointer + 16, 0); // Translation descriptor
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue