APT: Added stubbed ReceiveParameter and various cleanups.
APT: More cleanups. APT: Changed SignalType to be type u32.
This commit is contained in:
parent
d8da707bb9
commit
82702fedb8
@ -15,9 +15,16 @@
|
||||
|
||||
namespace APT_U {
|
||||
|
||||
/// Signals used by APT functions
|
||||
enum class SignalType : u32 {
|
||||
None = 0x0,
|
||||
AppJustStarted = 0x1,
|
||||
ReturningToApp = 0xB,
|
||||
ExitingApp = 0xC,
|
||||
};
|
||||
|
||||
void Initialize(Service::Interface* self) {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
DEBUG_LOG(KERNEL, "called");
|
||||
|
||||
cmd_buff[3] = Kernel::CreateEvent(RESETTYPE_ONESHOT, "APT_U:Menu"); // APT menu event handle
|
||||
cmd_buff[4] = Kernel::CreateEvent(RESETTYPE_ONESHOT, "APT_U:Pause"); // APT pause event handle
|
||||
@ -26,6 +33,7 @@ void Initialize(Service::Interface* self) {
|
||||
Kernel::SetEventLocked(cmd_buff[4], false); // Fire start event
|
||||
|
||||
cmd_buff[1] = 0; // No error
|
||||
DEBUG_LOG(KERNEL, "called");
|
||||
}
|
||||
|
||||
void GetLockHandle(Service::Interface* self) {
|
||||
@ -40,15 +48,29 @@ void Enable(Service::Interface* self) {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
u32 unk = cmd_buff[1]; // TODO(bunnei): What is this field used for?
|
||||
cmd_buff[1] = 0; // No error
|
||||
ERROR_LOG(KERNEL, "(UNIMPEMENTED) called unk=0x%08X", unk);
|
||||
WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X", unk);
|
||||
}
|
||||
|
||||
void InquireNotification(Service::Interface* self) {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
u32 app_id = cmd_buff[2];
|
||||
cmd_buff[1] = 0; // No error
|
||||
cmd_buff[3] = 0; // Signal type
|
||||
ERROR_LOG(KERNEL, "(UNIMPEMENTED) called app_id=0x%08X", app_id);
|
||||
cmd_buff[2] = static_cast<u32>(SignalType::None); // Signal type
|
||||
WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X", app_id);
|
||||
}
|
||||
|
||||
void ReceiveParameter(Service::Interface* self) {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
u32 app_id = cmd_buff[1];
|
||||
u32 buffer_size = cmd_buff[2];
|
||||
cmd_buff[1] = 0; // No error
|
||||
cmd_buff[2] = 0;
|
||||
cmd_buff[3] = static_cast<u32>(SignalType::AppJustStarted); // Signal type
|
||||
cmd_buff[4] = 0x10;
|
||||
cmd_buff[5] = 0;
|
||||
cmd_buff[6] = 0;
|
||||
cmd_buff[7] = 0;
|
||||
WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size);
|
||||
}
|
||||
|
||||
const Interface::FunctionInfo FunctionTable[] = {
|
||||
@ -64,7 +86,7 @@ const Interface::FunctionInfo FunctionTable[] = {
|
||||
{0x000A0040, nullptr, "GetAttribute"},
|
||||
{0x000B0040, InquireNotification, "InquireNotification"},
|
||||
{0x000C0104, nullptr, "SendParameter"},
|
||||
{0x000D0080, nullptr, "ReceiveParameter"},
|
||||
{0x000D0080, ReceiveParameter, "ReceiveParameter"},
|
||||
{0x000E0080, nullptr, "GlanceParameter"},
|
||||
{0x000F0100, nullptr, "CancelParameter"},
|
||||
{0x001000C2, nullptr, "DebugFunc"},
|
||||
|
Loading…
Reference in New Issue
Block a user