diff options
author | Liam <byteslice@airmail.cc> | 2022-10-16 07:53:56 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-10-31 22:44:06 +0100 |
commit | 983f2b70741f17f30fe2321451f10cabecc013d2 (patch) | |
tree | c1ac3c1033fdeefaabe76590ca204c4c1b2a98cd /src/core/hle/ipc_helpers.h | |
parent | Merge pull request #9159 from liamwhite/kbork (diff) | |
download | yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar.gz yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar.bz2 yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar.lz yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar.xz yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.tar.zst yuzu-983f2b70741f17f30fe2321451f10cabecc013d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/ipc_helpers.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index 18fde8bd6..3bb111748 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h @@ -86,13 +86,13 @@ public: u32 num_domain_objects{}; const bool always_move_handles{ (static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0}; - if (!ctx.Session()->GetSessionRequestManager()->IsDomain() || always_move_handles) { + if (!ctx.GetManager()->IsDomain() || always_move_handles) { num_handles_to_move = num_objects_to_move; } else { num_domain_objects = num_objects_to_move; } - if (ctx.Session()->GetSessionRequestManager()->IsDomain()) { + if (ctx.GetManager()->IsDomain()) { raw_data_size += static_cast<u32>(sizeof(DomainMessageHeader) / sizeof(u32) + num_domain_objects); ctx.write_size += num_domain_objects; @@ -125,8 +125,7 @@ public: if (!ctx.IsTipc()) { AlignWithPadding(); - if (ctx.Session()->GetSessionRequestManager()->IsDomain() && - ctx.HasDomainMessageHeader()) { + if (ctx.GetManager()->IsDomain() && ctx.HasDomainMessageHeader()) { IPC::DomainMessageHeader domain_header{}; domain_header.num_objects = num_domain_objects; PushRaw(domain_header); @@ -146,18 +145,18 @@ public: template <class T> void PushIpcInterface(std::shared_ptr<T> iface) { - if (context->Session()->GetSessionRequestManager()->IsDomain()) { + if (context->GetManager()->IsDomain()) { context->AddDomainObject(std::move(iface)); } else { kernel.CurrentProcess()->GetResourceLimit()->Reserve( Kernel::LimitableResource::Sessions, 1); auto* session = Kernel::KSession::Create(kernel); - session->Initialize(nullptr, iface->GetServiceName(), - std::make_shared<Kernel::SessionRequestManager>(kernel)); + session->Initialize(nullptr, iface->GetServiceName()); + iface->RegisterSession(&session->GetServerSession(), + std::make_shared<Kernel::SessionRequestManager>(kernel)); context->AddMoveObject(&session->GetClientSession()); - iface->ClientConnected(&session->GetServerSession()); } } @@ -387,7 +386,7 @@ public: template <class T> std::weak_ptr<T> PopIpcInterface() { - ASSERT(context->Session()->GetSessionRequestManager()->IsDomain()); + ASSERT(context->GetManager()->IsDomain()); ASSERT(context->GetDomainMessageHeader().input_object_count > 0); return context->GetDomainHandler<T>(Pop<u32>() - 1); } |