diff options
Diffstat (limited to 'src/core/hle/function_wrappers.h')
| -rw-r--r-- | src/core/hle/function_wrappers.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 31fda6db3..3e886fdba 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h | |||
| @@ -133,25 +133,13 @@ void Wrap() { | |||
| 133 | 133 | ||
| 134 | Memory::Write64(PARAM(0), memory_info.base_address); | 134 | Memory::Write64(PARAM(0), memory_info.base_address); |
| 135 | Memory::Write64(PARAM(0) + 8, memory_info.size); | 135 | Memory::Write64(PARAM(0) + 8, memory_info.size); |
| 136 | Memory::Write64(PARAM(0) + 16, memory_info.permission); | 136 | Memory::Write32(PARAM(0) + 16, memory_info.type); |
| 137 | Memory::Write64(PARAM(0) + 24, memory_info.state); | 137 | Memory::Write32(PARAM(0) + 20, memory_info.attributes); |
| 138 | Memory::Write32(PARAM(0) + 24, memory_info.permission); | ||
| 138 | 139 | ||
| 139 | FuncReturn(retval); | 140 | FuncReturn(retval); |
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | template <ResultCode func(MemoryInfo*, PageInfo*, Kernel::Handle, u32)> | ||
| 143 | void Wrap() { | ||
| 144 | MemoryInfo memory_info = {}; | ||
| 145 | PageInfo page_info = {}; | ||
| 146 | u32 retval = func(&memory_info, &page_info, PARAM(2), PARAM(3)).raw; | ||
| 147 | Core::CPU().SetReg(1, memory_info.base_address); | ||
| 148 | Core::CPU().SetReg(2, memory_info.size); | ||
| 149 | Core::CPU().SetReg(3, memory_info.permission); | ||
| 150 | Core::CPU().SetReg(4, memory_info.state); | ||
| 151 | Core::CPU().SetReg(5, page_info.flags); | ||
| 152 | FuncReturn(retval); | ||
| 153 | } | ||
| 154 | |||
| 155 | template <ResultCode func(s32*, u32)> | 143 | template <ResultCode func(s32*, u32)> |
| 156 | void Wrap() { | 144 | void Wrap() { |
| 157 | s32 param_1 = 0; | 145 | s32 param_1 = 0; |