aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/function_wrappers.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-23 11:18:49 -0700
committerGitHub <noreply@github.com>2017-06-23 11:18:49 -0700
commit6d436d7a5244ce54ae8ff7990cf8b90e9ea70355 (patch)
tree139073bfa7dc1a7de4ba4a66d7caf715ff2194f1 /src/core/hle/function_wrappers.h
parentcac1133bc40bf72f8d1be0898d000177de159fbb (diff)
parentf94093d0fd50e547256643734b67550de538860f (diff)
Merge pull request #2798 from yuriks/svc-create-session
Kernel: Implement CreateSession SVC
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 18b6e7017..b19b64509 100644
--- a/src/core/hle/function_wrappers.h
+++ b/src/core/hle/function_wrappers.h
@@ -232,6 +232,16 @@ void Wrap() {
FuncReturn(retval);
}
+template <ResultCode func(Kernel::Handle*, Kernel::Handle*)>
+void Wrap() {
+ Kernel::Handle param_1 = 0;
+ Kernel::Handle param_2 = 0;
+ u32 retval = func(&param_1, &param_2).raw;
+ Core::CPU().SetReg(1, param_1);
+ Core::CPU().SetReg(2, param_2);
+ FuncReturn(retval);
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Function wrappers that return type u32