From b863d6c86043226c8c88749c4e0eecaf9865c569 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Oct 2017 11:40:40 -0500 Subject: SVC: Replace GetPointer usage with Read32 in WaitSynchronizationN. --- src/core/hle/function_wrappers.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/function_wrappers.h') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 5e6002f4e..17892d81c 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -58,12 +58,12 @@ void Wrap() { FuncReturn(retval); } -template +template void Wrap() { s32 param_1 = 0; - s32 retval = func(¶m_1, (Kernel::Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2), - (PARAM(3) != 0), (((s64)PARAM(4) << 32) | PARAM(0))) - .raw; + s32 retval = + func(¶m_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); -- cgit v1.2.3 From 0cfb231e002629172337c048e8cabc8c653e34e3 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Oct 2017 11:49:29 -0500 Subject: SVC: Replace GetPointer usage with Read32 in ReplyAndReceive. --- src/core/hle/function_wrappers.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/hle/function_wrappers.h') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 17892d81c..cd500e83d 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -69,11 +69,10 @@ void Wrap() { FuncReturn(retval); } -template +template void Wrap() { s32 param_1 = 0; - u32 retval = - func(¶m_1, (Kernel::Handle*)Memory::GetPointer(PARAM(1)), (s32)PARAM(2), PARAM(3)).raw; + u32 retval = func(¶m_1, PARAM(1), (s32)PARAM(2), PARAM(3)).raw; Core::CPU().SetReg(1, (u32)param_1); FuncReturn(retval); -- cgit v1.2.3 From 3c0113632dc4fb4e55b5dad9278a5b766dcaec14 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Oct 2017 11:52:39 -0500 Subject: SVC: Replace GetPointer usage with ReadBlock in OutputDebugString. --- src/core/hle/function_wrappers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/function_wrappers.h') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index cd500e83d..cb0b430ee 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -267,9 +267,9 @@ void Wrap() { func(((s64)PARAM(1) << 32) | PARAM(0)); } -template +template void Wrap() { - func((char*)Memory::GetPointer(PARAM(0)), PARAM(1)); + func(PARAM(0), PARAM(1)); } template -- cgit v1.2.3 From 7b09b30ef11d1d4001a50bbb91abdfb86b954ce2 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Oct 2017 12:05:13 -0500 Subject: SVC: Replace GetPointer usage with ReadCString in ConnectToPort. --- src/core/hle/function_wrappers.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/core/hle/function_wrappers.h') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index cb0b430ee..a982b2b54 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -151,21 +151,6 @@ void Wrap() { FuncReturn(func(PARAM(0)).raw); } -template -void Wrap() { - FuncReturn(func((s64*)Memory::GetPointer(PARAM(0)), PARAM(1), - (u32*)Memory::GetPointer(PARAM(2)), (s32)PARAM(3)) - .raw); -} - -template -void Wrap() { - u32 param_1 = 0; - u32 retval = func(¶m_1, (char*)Memory::GetPointer(PARAM(1))).raw; - Core::CPU().SetReg(1, param_1); - FuncReturn(retval); -} - template void Wrap() { u32 param_1 = 0; -- cgit v1.2.3 From 46fc7595b4f5f161ecd5ae21259c661c15ca46f3 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 4 Oct 2017 12:11:55 -0500 Subject: SVC: Remove GetPointer usage in CreatePort. --- src/core/hle/function_wrappers.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/hle/function_wrappers.h') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index a982b2b54..f93439f21 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -206,13 +206,11 @@ void Wrap() { FuncReturn(func(PARAM(0), PARAM(1)).raw); } -template +template void Wrap() { Kernel::Handle param_1 = 0; Kernel::Handle param_2 = 0; - u32 retval = func(¶m_1, ¶m_2, - reinterpret_cast(Memory::GetPointer(PARAM(2))), PARAM(3)) - .raw; + u32 retval = func(¶m_1, ¶m_2, PARAM(2), PARAM(3)).raw; Core::CPU().SetReg(1, param_1); Core::CPU().SetReg(2, param_2); FuncReturn(retval); -- cgit v1.2.3