mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
[BOSS[ Stub optout flag
This commit is contained in:
parent
e69e95af69
commit
c41d9b4462
2 changed files with 14 additions and 2 deletions
|
@ -11,7 +11,9 @@ class BOSSService {
|
|||
|
||||
// Service commands
|
||||
void initializeSession(u32 messagePointer);
|
||||
void getOptoutFlag(u32 messagePointer);
|
||||
|
||||
s8 optoutFlag;
|
||||
public:
|
||||
BOSSService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
namespace BOSSCommands {
|
||||
enum : u32 {
|
||||
InitializeSession = 0x00010082
|
||||
InitializeSession = 0x00010082,
|
||||
GetOptoutFlag = 0x000A0000
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -12,11 +13,14 @@ namespace Result {
|
|||
};
|
||||
}
|
||||
|
||||
void BOSSService::reset() {}
|
||||
void BOSSService::reset() {
|
||||
optoutFlag = 0;
|
||||
}
|
||||
|
||||
void BOSSService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case BOSSCommands::GetOptoutFlag: getOptoutFlag(messagePointer); break;
|
||||
case BOSSCommands::InitializeSession: initializeSession(messagePointer); break;
|
||||
default: Helpers::panic("BOSS service requested. Command: %08X\n", command);
|
||||
}
|
||||
|
@ -25,4 +29,10 @@ void BOSSService::handleSyncRequest(u32 messagePointer) {
|
|||
void BOSSService::initializeSession(u32 messagePointer) {
|
||||
log("BOSS::InitializeSession (stubbed)\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
||||
|
||||
void BOSSService::getOptoutFlag(u32 messagePointer) {
|
||||
log("BOSS::getOptoutFlag\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
mem.write8(messagePointer + 8, optoutFlag);
|
||||
}
|
Loading…
Add table
Reference in a new issue