summaryrefslogtreecommitdiff
path: root/src/core/hle/service/ro
diff options
context:
space:
mode:
authorGravatar Liam2023-12-24 19:20:43 -0500
committerGravatar Liam2023-12-24 19:20:43 -0500
commit5165ed9efd6e6593b969ce560c952e074f4d9e06 (patch)
tree59966aa2ac0bd9186f7358af41f3888cbf89ec16 /src/core/hle/service/ro
parentMerge pull request #12394 from liamwhite/per-process-memory (diff)
downloadyuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.gz
yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.xz
yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.zip
service: fetch objects from the client handle table
Diffstat (limited to 'src/core/hle/service/ro')
-rw-r--r--src/core/hle/service/ro/ro.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cpp
index 17110d3f1..f0658bb5d 100644
--- a/src/core/hle/service/ro/ro.cpp
+++ b/src/core/hle/service/ro/ro.cpp
@@ -651,10 +651,9 @@ private:
651 void RegisterProcessHandle(HLERequestContext& ctx) { 651 void RegisterProcessHandle(HLERequestContext& ctx) {
652 LOG_DEBUG(Service_LDR, "(called)"); 652 LOG_DEBUG(Service_LDR, "(called)");
653 653
654 auto process_h = ctx.GetClientHandleTable().GetObject(ctx.GetCopyHandle(0)); 654 auto process = ctx.GetObjectFromHandle<Kernel::KProcess>(ctx.GetCopyHandle(0));
655 auto client_pid = ctx.GetPID(); 655 auto client_pid = ctx.GetPID();
656 auto result = interface.RegisterProcessHandle(client_pid, 656 auto result = interface.RegisterProcessHandle(client_pid, process.GetPointerUnsafe());
657 process_h->DynamicCast<Kernel::KProcess*>());
658 657
659 IPC::ResponseBuilder rb{ctx, 2}; 658 IPC::ResponseBuilder rb{ctx, 2};
660 rb.Push(result); 659 rb.Push(result);
@@ -671,12 +670,11 @@ private:
671 670
672 IPC::RequestParser rp{ctx}; 671 IPC::RequestParser rp{ctx};
673 auto params = rp.PopRaw<InputParameters>(); 672 auto params = rp.PopRaw<InputParameters>();
674 auto process_h = ctx.GetClientHandleTable().GetObject(ctx.GetCopyHandle(0)); 673 auto process = ctx.GetObjectFromHandle<Kernel::KProcess>(ctx.GetCopyHandle(0));
675 674
676 auto client_pid = ctx.GetPID(); 675 auto client_pid = ctx.GetPID();
677 auto result = 676 auto result = interface.RegisterProcessModuleInfo(
678 interface.RegisterProcessModuleInfo(client_pid, params.nrr_address, params.nrr_size, 677 client_pid, params.nrr_address, params.nrr_size, process.GetPointerUnsafe());
679 process_h->DynamicCast<Kernel::KProcess*>());
680 678
681 IPC::ResponseBuilder rb{ctx, 2}; 679 IPC::ResponseBuilder rb{ctx, 2};
682 rb.Push(result); 680 rb.Push(result);