summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/ac_u.cpp26
-rw-r--r--src/core/hle/svc.cpp4
2 files changed, 29 insertions, 1 deletions
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp
index d67325506..5241dd3e7 100644
--- a/src/core/hle/service/ac_u.cpp
+++ b/src/core/hle/service/ac_u.cpp
@@ -3,6 +3,8 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6
7#include "core/hle/kernel/event.h"
6#include "core/hle/service/ac_u.h" 8#include "core/hle/service/ac_u.h"
7 9
8//////////////////////////////////////////////////////////////////////////////////////////////////// 10////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -11,6 +13,28 @@
11namespace AC_U { 13namespace AC_U {
12 14
13/** 15/**
16 * AC_U::CloseAsync service function
17 * Inputs:
18 * 1 : Always 0x20
19 * 3 : Always 0
20 * 4 : Event handle, should be signaled when AC connection is closed
21 * Outputs:
22 * 1 : Result of function, 0 on success, otherwise error code
23 */
24static void CloseAsync(Service::Interface* self) {
25 u32* cmd_buff = Kernel::GetCommandBuffer();
26
27 auto evt = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
28
29 if (evt) {
30 evt->name = "AC_U:close_event";
31 evt->Signal();
32 }
33 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
34
35 LOG_WARNING(Service_AC, "(STUBBED) called");
36}
37/**
14 * AC_U::GetWifiStatus service function 38 * AC_U::GetWifiStatus service function
15 * Outputs: 39 * Outputs:
16 * 1 : Result of function, 0 on success, otherwise error code 40 * 1 : Result of function, 0 on success, otherwise error code
@@ -47,7 +71,7 @@ const Interface::FunctionInfo FunctionTable[] = {
47 {0x00010000, nullptr, "CreateDefaultConfig"}, 71 {0x00010000, nullptr, "CreateDefaultConfig"},
48 {0x00040006, nullptr, "ConnectAsync"}, 72 {0x00040006, nullptr, "ConnectAsync"},
49 {0x00050002, nullptr, "GetConnectResult"}, 73 {0x00050002, nullptr, "GetConnectResult"},
50 {0x00080004, nullptr, "CloseAsync"}, 74 {0x00080004, CloseAsync, "CloseAsync"},
51 {0x00090002, nullptr, "GetCloseResult"}, 75 {0x00090002, nullptr, "GetCloseResult"},
52 {0x000A0000, nullptr, "GetLastErrorCode"}, 76 {0x000A0000, nullptr, "GetLastErrorCode"},
53 {0x000D0000, GetWifiStatus, "GetWifiStatus"}, 77 {0x000D0000, GetWifiStatus, "GetWifiStatus"},
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index ae54afb1c..1112a905e 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -860,6 +860,10 @@ static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
860 // TODO(yuriks): Type 0 returns a slightly higher number than type 2, but I'm not sure 860 // TODO(yuriks): Type 0 returns a slightly higher number than type 2, but I'm not sure
861 // what's the difference between them. 861 // what's the difference between them.
862 *out = process->heap_used + process->linear_heap_used + process->misc_memory_used; 862 *out = process->heap_used + process->linear_heap_used + process->misc_memory_used;
863 if(*out % Memory::PAGE_SIZE != 0) {
864 LOG_ERROR(Kernel_SVC, "called, memory size not page-aligned");
865 return ERR_MISALIGNED_SIZE;
866 }
863 break; 867 break;
864 case 1: 868 case 1:
865 case 3: 869 case 3: