diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-26 11:46:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-26 11:46:11 -0500 |
| commit | de1e5584b32edcc5b43dd7b5757ee4b361f9f70c (patch) | |
| tree | a11721530b76fa281f0793ed8469fd9a847f5489 /src/core/hle/service/ro/ro.cpp | |
| parent | 1559984f77c4cf7474a8f806046b709576e4e439 (diff) | |
| parent | 47e44a6693ad2e8c7fbdaa23ed440d9780e1d54b (diff) | |
Merge pull request #12465 from liamwhite/proper-handle-table
service: fetch objects from the client handle table
Diffstat (limited to 'src/core/hle/service/ro/ro.cpp')
| -rw-r--r-- | src/core/hle/service/ro/ro.cpp | 12 |
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: void RegisterProcessHandle(HLERequestContext& ctx) { LOG_DEBUG(Service_LDR, "(called)"); - auto process_h = ctx.GetClientHandleTable().GetObject(ctx.GetCopyHandle(0)); + auto process = ctx.GetObjectFromHandle<Kernel::KProcess>(ctx.GetCopyHandle(0)); auto client_pid = ctx.GetPID(); - auto result = interface.RegisterProcessHandle(client_pid, - process_h->DynamicCast<Kernel::KProcess*>()); + auto result = interface.RegisterProcessHandle(client_pid, process.GetPointerUnsafe()); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(result); @@ -671,12 +670,11 @@ private: IPC::RequestParser rp{ctx}; auto params = rp.PopRaw<InputParameters>(); - auto process_h = ctx.GetClientHandleTable().GetObject(ctx.GetCopyHandle(0)); + auto process = ctx.GetObjectFromHandle<Kernel::KProcess>(ctx.GetCopyHandle(0)); auto client_pid = ctx.GetPID(); - auto result = - interface.RegisterProcessModuleInfo(client_pid, params.nrr_address, params.nrr_size, - process_h->DynamicCast<Kernel::KProcess*>()); + auto result = interface.RegisterProcessModuleInfo( + client_pid, params.nrr_address, params.nrr_size, process.GetPointerUnsafe()); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(result); |
