diff options
| author | 2016-06-11 22:46:35 -0400 | |
|---|---|---|
| committer | 2016-06-11 22:46:35 -0400 | |
| commit | 78f2b85fe6df35e3501f6dbd81ceea536fcdb8a1 (patch) | |
| tree | 73078fff8f77a252dcc51ec39e84b5606ad30133 /src/core/hle/function_wrappers.h | |
| parent | Merge pull request #1899 from wwylele/hid-cmath (diff) | |
| parent | Kernel/SVC: Implemented svcCreatePort. (diff) | |
| download | yuzu-78f2b85fe6df35e3501f6dbd81ceea536fcdb8a1.tar.gz yuzu-78f2b85fe6df35e3501f6dbd81ceea536fcdb8a1.tar.xz yuzu-78f2b85fe6df35e3501f6dbd81ceea536fcdb8a1.zip | |
Merge pull request #1842 from Subv/ports
Kernel: Added ClientPort and ServerPort classes, along with svcCreatePort.
Diffstat (limited to 'src/core/hle/function_wrappers.h')
| -rw-r--r-- | src/core/hle/function_wrappers.h | 10 |
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() { | |||
| 194 | FuncReturn(func(PARAM(0), PARAM(1)).raw); | 194 | FuncReturn(func(PARAM(0), PARAM(1)).raw); |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | template<ResultCode func(Handle*, Handle*, const char*, u32)> void Wrap() { | ||
| 198 | Handle param_1 = 0; | ||
| 199 | Handle param_2 = 0; | ||
| 200 | u32 retval = func(¶m_1, ¶m_2, reinterpret_cast<const char*>(Memory::GetPointer(PARAM(2))), PARAM(3)).raw; | ||
| 201 | // The first out parameter is moved into R2 and the second is moved into R1. | ||
| 202 | Core::g_app_core->SetReg(1, param_2); | ||
| 203 | Core::g_app_core->SetReg(2, param_1); | ||
| 204 | FuncReturn(retval); | ||
| 205 | } | ||
| 206 | |||
| 197 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 207 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 198 | // Function wrappers that return type u32 | 208 | // Function wrappers that return type u32 |
| 199 | 209 | ||