summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-02 17:54:07 -0400
committerGravatar bunnei2014-06-02 17:54:07 -0400
commit477b0caca4f0db084ab2d2dfb866fd81e5839228 (patch)
tree2d8ebb55b280edbd18b0227b70437c678f782b10 /src
parentsvc: changed DuplicateHandle log message from "error" to "debug" (diff)
downloadyuzu-477b0caca4f0db084ab2d2dfb866fd81e5839228.tar.gz
yuzu-477b0caca4f0db084ab2d2dfb866fd81e5839228.tar.xz
yuzu-477b0caca4f0db084ab2d2dfb866fd81e5839228.zip
svc: updated WaitSynchronizationN to properly use first pointer argument
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/function_wrappers.h4
-rw-r--r--src/core/hle/svc.cpp6
2 files changed, 6 insertions, 4 deletions
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<int func(u32, s64)> void WrapI_US64() {
766} 766}
767 767
768template<int func(void*, void*, u32, u32, s64)> void WrapI_VVUUS64() { 768template<int func(void*, void*, u32, u32, s64)> void WrapI_VVUUS64() {
769 int retval = func(Memory::GetPointer(PARAM(5)), Memory::GetPointer(PARAM(1)), PARAM(2), PARAM(3), (((u64)PARAM(4) << 32) | PARAM(0))); 769 u32 param_1 = 0;
770 int retval = func(&param_1, Memory::GetPointer(PARAM(1)), PARAM(2), PARAM(3), (((u64)PARAM(4) << 32) | PARAM(0)));
771 Core::g_app_core->SetReg(1, param_1);
770 RETURN(retval); 772 RETURN(retval);
771} 773}
772 774
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) {
147Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wait_all, 147Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wait_all,
148 s64 nano_seconds) { 148 s64 nano_seconds) {
149 // TODO(bunnei): Do something with nano_seconds, currently ignoring this 149 // TODO(bunnei): Do something with nano_seconds, currently ignoring this
150 150 s32* out = (s32*)_out;
151 Handle* handles = (Handle*)_handles; 151 Handle* handles = (Handle*)_handles;
152 bool unlock_all = true; 152 bool unlock_all = true;
153 153
@@ -167,7 +167,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
167 Result res = object->WaitSynchronization(&wait); 167 Result res = object->WaitSynchronization(&wait);
168 168
169 if (!wait && !wait_all) { 169 if (!wait && !wait_all) {
170 Core::g_app_core->SetReg(1, i); 170 *out = i;
171 return 0; 171 return 0;
172 } else { 172 } else {
173 unlock_all = false; 173 unlock_all = false;
@@ -175,7 +175,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
175 } 175 }
176 176
177 if (wait_all && unlock_all) { 177 if (wait_all && unlock_all) {
178 Core::g_app_core->SetReg(1, handle_count); 178 *out = handle_count;
179 return 0; 179 return 0;
180 } 180 }
181 181