summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-18 22:30:53 -0500
committerGravatar Lioncash2018-12-18 22:30:56 -0500
commit43e1189688a948e167ade54fdf2ba4007289aefd (patch)
treeb00f881250c7c0679e401251aed411b72f2cea59 /src
parentkernel/process: Make process_id a 64-bit value (diff)
downloadyuzu-43e1189688a948e167ade54fdf2ba4007289aefd.tar.gz
yuzu-43e1189688a948e167ade54fdf2ba4007289aefd.tar.xz
yuzu-43e1189688a948e167ade54fdf2ba4007289aefd.zip
kernel/svc: Correct output parameter for svcGetProcessId
svcGetProcessId's out parameter is a pointer to a 64-bit value, not a 32-bit one.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp2
-rw-r--r--src/core/hle/kernel/svc_wrap.h10
2 files changed, 10 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 348a22904..c8b60b16c 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -365,7 +365,7 @@ static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) {
365} 365}
366 366
367/// Get the ID of the specified process 367/// Get the ID of the specified process
368static ResultCode GetProcessId(u32* process_id, Handle process_handle) { 368static ResultCode GetProcessId(u64* process_id, Handle process_handle) {
369 LOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle); 369 LOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
370 370
371 const auto& handle_table = Core::CurrentProcess()->GetHandleTable(); 371 const auto& handle_table = Core::CurrentProcess()->GetHandleTable();
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index 2f758b959..2a2c2c5ea 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -73,7 +73,15 @@ void SvcWrap() {
73template <ResultCode func(u32*, u64)> 73template <ResultCode func(u32*, u64)>
74void SvcWrap() { 74void SvcWrap() {
75 u32 param_1 = 0; 75 u32 param_1 = 0;
76 u32 retval = func(&param_1, Param(1)).raw; 76 const u32 retval = func(&param_1, Param(1)).raw;
77 Core::CurrentArmInterface().SetReg(1, param_1);
78 FuncReturn(retval);
79}
80
81template <ResultCode func(u64*, u32)>
82void SvcWrap() {
83 u64 param_1 = 0;
84 const u32 retval = func(&param_1, static_cast<u32>(Param(1))).raw;
77 Core::CurrentArmInterface().SetReg(1, param_1); 85 Core::CurrentArmInterface().SetReg(1, param_1);
78 FuncReturn(retval); 86 FuncReturn(retval);
79} 87}