summaryrefslogtreecommitdiffstats
path: root/src/core/hle/function_wrappers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/function_wrappers.h')
-rw-r--r--src/core/hle/function_wrappers.h38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h
index 5e6002f4e..f93439f21 100644
--- a/src/core/hle/function_wrappers.h
+++ b/src/core/hle/function_wrappers.h
@@ -58,22 +58,21 @@ void Wrap() {
FuncReturn(retval);
}
-template <ResultCode func(s32*, u32*, s32, bool, s64)>
+template <ResultCode func(s32*, VAddr, s32, bool, s64)>
void Wrap() {
s32 param_1 = 0;
- s32 retval = func(&param_1, (Kernel::Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2),
- (PARAM(3) != 0), (((s64)PARAM(4) << 32) | PARAM(0)))
- .raw;
+ s32 retval =
+ func(&param_1, PARAM(1), (s32)PARAM(2), (PARAM(3) != 0), (((s64)PARAM(4) << 32) | PARAM(0)))
+ .raw;
Core::CPU().SetReg(1, (u32)param_1);
FuncReturn(retval);
}
-template <ResultCode func(s32*, u32*, s32, u32)>
+template <ResultCode func(s32*, VAddr, s32, u32)>
void Wrap() {
s32 param_1 = 0;
- u32 retval =
- func(&param_1, (Kernel::Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2), PARAM(3)).raw;
+ u32 retval = func(&param_1, PARAM(1), (s32)PARAM(2), PARAM(3)).raw;
Core::CPU().SetReg(1, (u32)param_1);
FuncReturn(retval);
@@ -152,21 +151,6 @@ void Wrap() {
FuncReturn(func(PARAM(0)).raw);
}
-template <ResultCode func(s64*, u32, u32*, u32)>
-void Wrap() {
- FuncReturn(func((s64*)Memory::GetPointer(PARAM(0)), PARAM(1),
- (u32*)Memory::GetPointer(PARAM(2)), (s32)PARAM(3))
- .raw);
-}
-
-template <ResultCode func(u32*, const char*)>
-void Wrap() {
- u32 param_1 = 0;
- u32 retval = func(&param_1, (char*)Memory::GetPointer(PARAM(1))).raw;
- Core::CPU().SetReg(1, param_1);
- FuncReturn(retval);
-}
-
template <ResultCode func(u32*, s32, s32)>
void Wrap() {
u32 param_1 = 0;
@@ -222,13 +206,11 @@ void Wrap() {
FuncReturn(func(PARAM(0), PARAM(1)).raw);
}
-template <ResultCode func(Kernel::Handle*, Kernel::Handle*, const char*, u32)>
+template <ResultCode func(Kernel::Handle*, Kernel::Handle*, VAddr, u32)>
void Wrap() {
Kernel::Handle param_1 = 0;
Kernel::Handle param_2 = 0;
- u32 retval = func(&param_1, &param_2,
- reinterpret_cast<const char*>(Memory::GetPointer(PARAM(2))), PARAM(3))
- .raw;
+ u32 retval = func(&param_1, &param_2, PARAM(2), PARAM(3)).raw;
Core::CPU().SetReg(1, param_1);
Core::CPU().SetReg(2, param_2);
FuncReturn(retval);
@@ -268,9 +250,9 @@ void Wrap() {
func(((s64)PARAM(1) << 32) | PARAM(0));
}
-template <void func(const char*, int len)>
+template <void func(VAddr, int len)>
void Wrap() {
- func((char*)Memory::GetPointer(PARAM(0)), PARAM(1));
+ func(PARAM(0), PARAM(1));
}
template <void func(u8)>