From 8c6a8edacac4657c8cb75be86b9c4e6e7d1b7604 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Thu, 22 Jun 2017 23:56:17 -0700 Subject: [PATCH] Kernel: Fix SVC wrapper for CreatePort The return parameters were flipped. --- src/core/hle/function_wrappers.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index b19b64509..410bb87ea 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -226,9 +226,8 @@ void Wrap() { u32 retval = func(¶m_1, ¶m_2, reinterpret_cast(Memory::GetPointer(PARAM(2))), PARAM(3)) .raw; - // The first out parameter is moved into R2 and the second is moved into R1. - Core::CPU().SetReg(1, param_2); - Core::CPU().SetReg(2, param_1); + Core::CPU().SetReg(1, param_1); + Core::CPU().SetReg(2, param_2); FuncReturn(retval); }