summaryrefslogtreecommitdiffstats
path: root/src/core/hle/function_wrappers.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-05-22 19:30:13 +0200
committerSubv <subv2112@gmail.com>2016-06-11 15:37:37 +0200
commit7b445ddff0be3e0210cb217c74cb34a16799ce0d (patch)
treef752a9eda53997e2268e5a5cbc534e6562c3553d /src/core/hle/function_wrappers.h
parentKernel: Added ClientPort and ServerPort classes. (diff)
downloadyuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar.gz
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar.bz2
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar.lz
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar.xz
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.tar.zst
yuzu-7b445ddff0be3e0210cb217c74cb34a16799ce0d.zip
Diffstat (limited to 'src/core/hle/function_wrappers.h')
-rw-r--r--src/core/hle/function_wrappers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h
index bf7f875b6..8839ce482 100644
--- a/src/core/hle/function_wrappers.h
+++ b/src/core/hle/function_wrappers.h
@@ -194,6 +194,16 @@ template<ResultCode func(Handle, u32)> void Wrap() {
FuncReturn(func(PARAM(0), PARAM(1)).raw);
}
+template<ResultCode func(Handle*, Handle*, const char*, u32)> void Wrap() {
+ Handle param_1 = 0;
+ Handle param_2 = 0;
+ u32 retval = func(&param_1, &param_2, reinterpret_cast<const char*>(Memory::GetPointer(PARAM(2))), PARAM(3)).raw;
+ // The first out parameter is moved into R2 and the second is moved into R1.
+ Core::g_app_core->SetReg(1, param_2);
+ Core::g_app_core->SetReg(2, param_1);
+ FuncReturn(retval);
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Function wrappers that return type u32