mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
Add BOSS:SetOptoutFlag
This commit is contained in:
parent
88eebbcbae
commit
103cb6acc2
2 changed files with 12 additions and 0 deletions
|
@ -28,6 +28,7 @@ class BOSSService {
|
|||
void registerStorageEntry(u32 messagePointer);
|
||||
void registerTask(u32 messagePointer);
|
||||
void sendProperty(u32 messagePointer);
|
||||
void setOptoutFlag(u32 messagePointer);
|
||||
void startTask(u32 messagePointer);
|
||||
void unregisterStorage(u32 messagePointer);
|
||||
void unregisterTask(u32 messagePointer);
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace BOSSCommands {
|
|||
UnregisterStorage = 0x00030000,
|
||||
GetTaskStorageInfo = 0x00040000,
|
||||
RegisterNewArrivalEvent = 0x00080002,
|
||||
SetOptoutFlag = 0x00090040,
|
||||
GetOptoutFlag = 0x000A0000,
|
||||
RegisterTask = 0x000B00C2,
|
||||
UnregisterTask = 0x000C0082,
|
||||
|
@ -53,6 +54,7 @@ void BOSSService::handleSyncRequest(u32 messagePointer) {
|
|||
case BOSSCommands::RegisterStorageEntry: registerStorageEntry(messagePointer); break;
|
||||
case BOSSCommands::RegisterTask: registerTask(messagePointer); break;
|
||||
case BOSSCommands::SendProperty: sendProperty(messagePointer); break;
|
||||
case BOSSCommands::SetOptoutFlag: setOptoutFlag(messagePointer); break;
|
||||
case BOSSCommands::StartTask: startTask(messagePointer); break;
|
||||
case BOSSCommands::UnregisterStorage: unregisterStorage(messagePointer); break;
|
||||
case BOSSCommands::UnregisterTask: unregisterTask(messagePointer); break;
|
||||
|
@ -66,6 +68,15 @@ void BOSSService::initializeSession(u32 messagePointer) {
|
|||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
||||
|
||||
void BOSSService::setOptoutFlag(u32 messagePointer) {
|
||||
const s8 flag = static_cast<s8>(mem.read8(messagePointer + 4));
|
||||
log("BOSS::SetOptoutFlag (flag = %d)\n", flag);
|
||||
optoutFlag = flag;
|
||||
|
||||
mem.write32(messagePointer, IPC::responseHeader(0x9, 1, 0));
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
||||
|
||||
void BOSSService::getOptoutFlag(u32 messagePointer) {
|
||||
log("BOSS::GetOptoutFlag\n");
|
||||
mem.write32(messagePointer, IPC::responseHeader(0xA, 2, 0));
|
||||
|
|
Loading…
Add table
Reference in a new issue