summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLectem <lectem@gmail.com>2017-03-19 01:33:56 +0100
committerLectem <lectem@gmail.com>2017-03-19 01:33:56 +0100
commite9c80ea5b778cd94363c5bb6284bb856c076cc5d (patch)
tree202c9a47690e9cef2ee554884ab899c58d1b889b /src/core
parentCast size_t to u32 for PushStaticBuffer usages (diff)
downloadyuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar.gz
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar.bz2
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar.lz
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar.xz
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.tar.zst
yuzu-e9c80ea5b778cd94363c5bb6284bb856c076cc5d.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/apt/apt.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index ac5144cd5..c2daf8f26 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -132,7 +132,7 @@ void Enable(Service::Interface* self) {
void GetAppletManInfo(Service::Interface* self) {
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x5, 1, 0); // 0x50040
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<u32>(0);
rb.Push<u32>(0);
@@ -216,10 +216,10 @@ void ReceiveParameter(Service::Interface* self) {
size_t static_buff_size;
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
if (buffer_size > static_buff_size)
- LOG_WARNING(Service_APT,
- "ReceiveParameter: buffer_size is bigger than the size in the "
- "buffer descriptor (0x%08X > 0x%08zX)",
- buffer_size, static_buff_size);
+ LOG_WARNING(
+ Service_APT,
+ "buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
+ buffer_size, static_buff_size);
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
rb.Push(RESULT_SUCCESS); // No error
@@ -246,10 +246,10 @@ void GlanceParameter(Service::Interface* self) {
size_t static_buff_size;
VAddr buffer = rp.PeekStaticBuffer(0, &static_buff_size);
if (buffer_size > static_buff_size)
- LOG_WARNING(Service_APT,
- "ReceiveParameter: buffer_size is bigger than the size in the "
- "buffer descriptor (0x%08X > 0x%08zX)",
- buffer_size, static_buff_size);
+ LOG_WARNING(
+ Service_APT,
+ "buffer_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
+ buffer_size, static_buff_size);
IPC::RequestBuilder rb = rp.MakeBuilder(4, 4);
rb.Push(RESULT_SUCCESS); // No error
@@ -279,8 +279,9 @@ void CancelParameter(Service::Interface* self) {
rb.Push(RESULT_SUCCESS); // No error
rb.Push(true); // Set to Success
- LOG_WARNING(Service_APT, "(STUBBED) called check_sender=0x%08X, sender_appid=0x%08X, "
- "check_receiver=0x%08X, receiver_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_sender, sender_appid, check_receiver, receiver_appid);
}
@@ -436,7 +437,7 @@ void CancelLibraryApplet(Service::Interface* self) {
bool exiting = rp.Pop<bool>();
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);
}
@@ -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]
IPC::RequestBuilder rb = rp.MakeBuilder(7, 0);
rb.Push(RESULT_SUCCESS);
- u64 titileId = 0;
- rb.Push(titileId);
+ u64 title_id = 0;
+ rb.Push(title_id);
rb.Push(static_cast<u32>(Service::FS::MediaType::NAND));
rb.Push(true); // Registered
rb.Push(true); // Loaded
@@ -487,8 +488,7 @@ void GetAppletInfo(Service::Interface* self) {
void GetStartupArgument(Service::Interface* self) {
IPC::RequestParser rp(Kernel::GetCommandBuffer(), 0x51, 2, 0); // 0x00510080
u32 parameter_size = rp.Pop<u32>();
- StartupArgumentType startup_argument_type =
- static_cast<StartupArgumentType>(rp.Pop<u32>() & 0xF);
+ StartupArgumentType startup_argument_type = static_cast<StartupArgumentType>(rp.Pop<u8>());
if (parameter_size >= 0x300) {
LOG_ERROR(
@@ -501,10 +501,10 @@ void GetStartupArgument(Service::Interface* self) {
size_t static_buff_size;
VAddr addr = rp.PeekStaticBuffer(0, &static_buff_size);
if (parameter_size > static_buff_size)
- LOG_WARNING(Service_APT,
- "GetStartupArgument: parameter_size is bigger than the size in "
- "the buffer descriptor (0x%08X > 0x%08zX)",
- parameter_size, static_buff_size);
+ LOG_WARNING(
+ Service_APT,
+ "parameter_size is bigger than the size in the buffer descriptor (0x%08X > 0x%08zX)",
+ parameter_size, static_buff_size);
if (addr && parameter_size) {
Memory::ZeroBlock(addr, parameter_size);