summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-03 05:50:17 +0200
committerbunnei <bunneidev@gmail.com>2018-04-03 05:51:01 +0200
commit40bccd74d3336e69112694b2d0e42683efcd4367 (patch)
treec7a28e58e2b7cba62faa6e6989dc240f28f021c9 /src/core/hle
parentaudren_u: Stub out GetActiveAudioDeviceName. (diff)
downloadyuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar.gz
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar.bz2
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar.lz
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar.xz
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.tar.zst
yuzu-40bccd74d3336e69112694b2d0e42683efcd4367.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/svc.cpp16
-rw-r--r--src/core/hle/kernel/svc_wrap.h5
2 files changed, 19 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 171bbd956..36ea23cd9 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -371,6 +371,18 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
return RESULT_SUCCESS;
}
+/// Sets the thread activity
+static ResultCode SetThreadActivity(Handle handle, u32 unknown) {
+ LOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x%08X, unknown=0x%08X", handle, unknown);
+ return RESULT_SUCCESS;
+}
+
+/// Gets the thread context
+static ResultCode GetThreadContext(Handle handle, VAddr addr) {
+ LOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x%08X, addr=0x%" PRIx64, handle, addr);
+ return RESULT_SUCCESS;
+}
+
/// Gets the priority for the specified thread
static ResultCode GetThreadPriority(u32* priority, Handle handle) {
const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(handle);
@@ -853,8 +865,8 @@ static const FunctionDef SVC_Table[] = {
{0x2F, nullptr, "GetLastThreadInfo"},
{0x30, nullptr, "GetResourceLimitLimitValue"},
{0x31, nullptr, "GetResourceLimitCurrentValue"},
- {0x32, nullptr, "SetThreadActivity"},
- {0x33, nullptr, "GetThreadContext"},
+ {0x32, SvcWrap<SetThreadActivity>, "SetThreadActivity"},
+ {0x33, SvcWrap<GetThreadContext>, "GetThreadContext"},
{0x34, nullptr, "Unknown"},
{0x35, nullptr, "Unknown"},
{0x36, nullptr, "Unknown"},
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index 5da4f5269..c86ad3e04 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -70,6 +70,11 @@ void SvcWrap() {
FuncReturn(retval);
}
+template <ResultCode func(u32, u64)>
+void SvcWrap() {
+ FuncReturn(func((u32)(PARAM(0) & 0xFFFFFFFF), PARAM(1)).raw);
+}
+
template <ResultCode func(u32, u32, u64)>
void SvcWrap() {
FuncReturn(func((u32)(PARAM(0) & 0xFFFFFFFF), (u32)(PARAM(1) & 0xFFFFFFFF), PARAM(2)).raw);