From 477b0caca4f0db084ab2d2dfb866fd81e5839228 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 2 Jun 2014 17:54:07 -0400 Subject: svc: updated WaitSynchronizationN to properly use first pointer argument --- src/core/hle/function_wrappers.h | 4 +++- src/core/hle/svc.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index 65e3164c4..2d0dcf476 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h @@ -766,7 +766,9 @@ template void WrapI_US64() { } template void WrapI_VVUUS64() { - int retval = func(Memory::GetPointer(PARAM(5)), Memory::GetPointer(PARAM(1)), PARAM(2), PARAM(3), (((u64)PARAM(4) << 32) | PARAM(0))); + u32 param_1 = 0; + int retval = func(¶m_1, Memory::GetPointer(PARAM(1)), PARAM(2), PARAM(3), (((u64)PARAM(4) << 32) | PARAM(0))); + Core::g_app_core->SetReg(1, param_1); RETURN(retval); } diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 1f36c7ac5..c8eb8ea80 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -147,7 +147,7 @@ Result WaitSynchronization1(Handle handle, s64 nano_seconds) { Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wait_all, s64 nano_seconds) { // TODO(bunnei): Do something with nano_seconds, currently ignoring this - + s32* out = (s32*)_out; Handle* handles = (Handle*)_handles; bool unlock_all = true; @@ -167,7 +167,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa Result res = object->WaitSynchronization(&wait); if (!wait && !wait_all) { - Core::g_app_core->SetReg(1, i); + *out = i; return 0; } else { unlock_all = false; @@ -175,7 +175,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa } if (wait_all && unlock_all) { - Core::g_app_core->SetReg(1, handle_count); + *out = handle_count; return 0; } -- cgit v1.2.3