address more comments
This commit is contained in:
parent
979d2000d2
commit
e9c80ea5b7
|
@ -132,7 +132,7 @@ void Enable(Service::Interface* self) {
|
||||||
void GetAppletManInfo(Service::Interface* self) {
|
void GetAppletManInfo(Service::Interface* self) {
|
||||||
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 1, 0); // 0x50040
|
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 1, 0); // 0x50040
|
||||||
u32 unk = rp.Pop<u32>();
|
u32 unk = rp.Pop<u32>();
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
rb.Push<u32>(0);
|
rb.Push<u32>(0);
|
||||||
|
@ -216,9 +216,9 @@ void ReceiveParameter(Service::Interface* self) {
|
||||||
size_t static_buff_size;
|
size_t static_buff_size;
|
||||||
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
|
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
|
||||||
if (buffer_size > static_buff_size)
|
if (buffer_size > static_buff_size)
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(
|
||||||
"ReceiveParameter: buffer_size is bigger than the size in the "
|
Service_APT,
|
||||||
"buffer descriptor (0x%08X > 0x%08zX)",
|
"buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
|
||||||
buffer_size, static_buff_size);
|
buffer_size, static_buff_size);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
|
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
|
||||||
|
@ -246,9 +246,9 @@ void GlanceParameter(Service::Interface* self) {
|
||||||
size_t static_buff_size;
|
size_t static_buff_size;
|
||||||
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
|
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
|
||||||
if (buffer_size > static_buff_size)
|
if (buffer_size > static_buff_size)
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(
|
||||||
"ReceiveParameter: buffer_size is bigger than the size in the "
|
Service_APT,
|
||||||
"buffer descriptor (0x%08X > 0x%08zX)",
|
"buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
|
||||||
buffer_size, static_buff_size);
|
buffer_size, static_buff_size);
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
|
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
|
||||||
|
@ -279,7 +279,8 @@ void CancelParameter(Service::Interface* self) {
|
||||||
rb.Push(RESULT_SUCCESS); // No error
|
rb.Push(RESULT_SUCCESS); // No error
|
||||||
rb.Push(true); // Set to Success
|
rb.Push(true); // Set to Success
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called check_sender=0x%08X, sender_appid=0x%08X, "
|
LOG_WARNING(Service_APT,
|
||||||
|
"(STUBBED) called check_sender=0x%08X, sender_appid=0x%08X, "
|
||||||
"check_receiver=0x%08X, receiver_appid=0x%08X",
|
"check_receiver=0x%08X, receiver_appid=0x%08X",
|
||||||
check_sender, sender_appid, check_receiver, receiver_appid);
|
check_sender, sender_appid, check_receiver, receiver_appid);
|
||||||
}
|
}
|
||||||
|
@ -436,7 +437,7 @@ void CancelLibraryApplet(Service::Interface* self) {
|
||||||
bool exiting = rp.Pop<bool>();
|
bool exiting = rp.Pop<bool>();
|
||||||
|
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||||
rb.Push<u32>(1);
|
rb.Push<u32>(1); // TODO: Find the return code meaning
|
||||||
|
|
||||||
LOG_WARNING(Service_APT, "(STUBBED) called exiting=%d", exiting);
|
LOG_WARNING(Service_APT, "(STUBBED) called exiting=%d", exiting);
|
||||||
}
|
}
|
||||||
|
@ -470,8 +471,8 @@ void GetAppletInfo(Service::Interface* self) {
|
||||||
// TODO(Subv): Get the title id for the current applet and write it in the response[2-3]
|
// TODO(Subv): Get the title id for the current applet and write it in the response[2-3]
|
||||||
IPC::RequestBuilder rb = rp.MakeBuilder(7, 0);
|
IPC::RequestBuilder rb = rp.MakeBuilder(7, 0);
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
u64 titileId = 0;
|
u64 title_id = 0;
|
||||||
rb.Push(titileId);
|
rb.Push(title_id);
|
||||||
rb.Push(static_cast<u32>(Service::FS::MediaType::NAND));
|
rb.Push(static_cast<u32>(Service::FS::MediaType::NAND));
|
||||||
rb.Push(true); // Registered
|
rb.Push(true); // Registered
|
||||||
rb.Push(true); // Loaded
|
rb.Push(true); // Loaded
|
||||||
|
@ -487,8 +488,7 @@ void GetAppletInfo(Service::Interface* self) {
|
||||||
void GetStartupArgument(Service::Interface* self) {
|
void GetStartupArgument(Service::Interface* self) {
|
||||||
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x51, 2, 0); // 0x00510080
|
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x51, 2, 0); // 0x00510080
|
||||||
u32 parameter_size = rp.Pop<u32>();
|
u32 parameter_size = rp.Pop<u32>();
|
||||||
StartupArgumentType startup_argument_type =
|
StartupArgumentType startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
|
||||||
static_cast<StartupArgumentType>(rp.Pop<u32>() & 0xF);
|
|
||||||
|
|
||||||
if (parameter_size >= 0x300) {
|
if (parameter_size >= 0x300) {
|
||||||
LOG_ERROR(
|
LOG_ERROR(
|
||||||
|
@ -501,9 +501,9 @@ void GetStartupArgument(Service::Interface* self) {
|
||||||
size_t static_buff_size;
|
size_t static_buff_size;
|
||||||
VAddr addr = rp.PeekStaticBuffer(0, &static_buff_size);
|
VAddr addr = rp.PeekStaticBuffer(0, &static_buff_size);
|
||||||
if (parameter_size > static_buff_size)
|
if (parameter_size > static_buff_size)
|
||||||
LOG_WARNING(Service_APT,
|
LOG_WARNING(
|
||||||
"GetStartupArgument: parameter_size is bigger than the size in "
|
Service_APT,
|
||||||
"the buffer descriptor (0x%08X > 0x%08zX)",
|
"parameter_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
|
||||||
parameter_size, static_buff_size);
|
parameter_size, static_buff_size);
|
||||||
|
|
||||||
if (addr && parameter_size) {
|
if (addr && parameter_size) {
|
||||||
|
|
Reference in New Issue