summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormailwl <mailwl@gmail.com>2016-04-07 10:26:12 +0200
committermailwl <mailwl@gmail.com>2016-04-21 09:34:45 +0200
commitbd8cc69893e49ff0615c326301d8d2a5a49bee7e (patch)
treea9dfceb164977639f8945b82dbeef71733966317 /src
parentMerge pull request #1691 from linkmauve/improve-sdl-options (diff)
downloadyuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar.gz
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar.bz2
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar.lz
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar.xz
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.tar.zst
yuzu-bd8cc69893e49ff0615c326301d8d2a5a49bee7e.zip
Diffstat (limited to 'src')
-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 @@
// Refer to the license.txt file included.
#include "common/logging/log.h"
+
+#include "core/hle/kernel/event.h"
#include "core/hle/service/ac_u.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -11,6 +13,28 @@
namespace AC_U {
/**
+ * AC_U::CloseAsync service function
+ * Inputs:
+ * 1 : Always 0x20
+ * 3 : Always 0
+ * 4 : Event handle, should be signaled when AC connection is closed
+ * Outputs:
+ * 1 : Result of function, 0 on success, otherwise error code
+ */
+static void CloseAsync(Service::Interface* self) {
+ u32* cmd_buff = Kernel::GetCommandBuffer();
+
+ auto evt = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
+
+ if (evt) {
+ evt->name = "AC_U:close_event";
+ evt->Signal();
+ }
+ cmd_buff[1] = RESULT_SUCCESS.raw; // No error
+
+ LOG_WARNING(Service_AC, "(STUBBED) called");
+}
+/**
* AC_U::GetWifiStatus service function
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
@@ -47,7 +71,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00010000, nullptr, "CreateDefaultConfig"},
{0x00040006, nullptr, "ConnectAsync"},
{0x00050002, nullptr, "GetConnectResult"},
- {0x00080004, nullptr, "CloseAsync"},
+ {0x00080004, CloseAsync, "CloseAsync"},
{0x00090002, nullptr, "GetCloseResult"},
{0x000A0000, nullptr, "GetLastErrorCode"},
{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) {
// TODO(yuriks): Type 0 returns a slightly higher number than type 2, but I'm not sure
// what's the difference between them.
*out = process->heap_used + process->linear_heap_used + process->misc_memory_used;
+ if(*out % Memory::PAGE_SIZE != 0) {
+ LOG_ERROR(Kernel_SVC, "called, memory size not page-aligned");
+ return ERR_MISALIGNED_SIZE;
+ }
break;
case 1:
case 3: