diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-30 03:07:49 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-30 03:23:15 +0200 |
commit | f6893969b38112a96e92f3a5f8779c4854c95365 (patch) | |
tree | 047b5f11cdb5d921b29afad96dc86a639d9c7ff4 /src/core/hle/kernel/svc_wrap.h | |
parent | service: Add NFP module interface. (diff) | |
download | yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar.gz yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar.bz2 yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar.lz yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar.xz yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.tar.zst yuzu-f6893969b38112a96e92f3a5f8779c4854c95365.zip |
Diffstat (limited to 'src/core/hle/kernel/svc_wrap.h')
-rw-r--r-- | src/core/hle/kernel/svc_wrap.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index b224f5e67..5da4f5269 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -70,6 +70,21 @@ void SvcWrap() { FuncReturn(retval); } +template <ResultCode func(u32, u32, u64)> +void SvcWrap() { + FuncReturn(func((u32)(PARAM(0) & 0xFFFFFFFF), (u32)(PARAM(1) & 0xFFFFFFFF), PARAM(2)).raw); +} + +template <ResultCode func(u32, u32*, u64*)> +void SvcWrap() { + u32 param_1 = 0; + u64 param_2 = 0; + ResultCode retval = func((u32)(PARAM(2) & 0xFFFFFFFF), ¶m_1, ¶m_2); + Core::CPU().SetReg(1, param_1); + Core::CPU().SetReg(2, param_2); + FuncReturn(retval.raw); +} + template <ResultCode func(u64, u64, u32, u32)> void SvcWrap() { FuncReturn( |