diff options
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
| -rw-r--r-- | src/core/hle/ipc_helpers.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index 0cc26a211..aa27be767 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h | |||
| @@ -86,13 +86,13 @@ public: | |||
| 86 | u32 num_domain_objects{}; | 86 | u32 num_domain_objects{}; |
| 87 | const bool always_move_handles{ | 87 | const bool always_move_handles{ |
| 88 | (static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0}; | 88 | (static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0}; |
| 89 | if (!ctx.Session()->IsDomain() || always_move_handles) { | 89 | if (!ctx.Session()->GetSessionRequestManager()->IsDomain() || always_move_handles) { |
| 90 | num_handles_to_move = num_objects_to_move; | 90 | num_handles_to_move = num_objects_to_move; |
| 91 | } else { | 91 | } else { |
| 92 | num_domain_objects = num_objects_to_move; | 92 | num_domain_objects = num_objects_to_move; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | if (ctx.Session()->IsDomain()) { | 95 | if (ctx.Session()->GetSessionRequestManager()->IsDomain()) { |
| 96 | raw_data_size += | 96 | raw_data_size += |
| 97 | static_cast<u32>(sizeof(DomainMessageHeader) / sizeof(u32) + num_domain_objects); | 97 | static_cast<u32>(sizeof(DomainMessageHeader) / sizeof(u32) + num_domain_objects); |
| 98 | ctx.write_size += num_domain_objects; | 98 | ctx.write_size += num_domain_objects; |
| @@ -125,7 +125,8 @@ public: | |||
| 125 | if (!ctx.IsTipc()) { | 125 | if (!ctx.IsTipc()) { |
| 126 | AlignWithPadding(); | 126 | AlignWithPadding(); |
| 127 | 127 | ||
| 128 | if (ctx.Session()->IsDomain() && ctx.HasDomainMessageHeader()) { | 128 | if (ctx.Session()->GetSessionRequestManager()->IsDomain() && |
| 129 | ctx.HasDomainMessageHeader()) { | ||
| 129 | IPC::DomainMessageHeader domain_header{}; | 130 | IPC::DomainMessageHeader domain_header{}; |
| 130 | domain_header.num_objects = num_domain_objects; | 131 | domain_header.num_objects = num_domain_objects; |
| 131 | PushRaw(domain_header); | 132 | PushRaw(domain_header); |
| @@ -145,7 +146,7 @@ public: | |||
| 145 | 146 | ||
| 146 | template <class T> | 147 | template <class T> |
| 147 | void PushIpcInterface(std::shared_ptr<T> iface) { | 148 | void PushIpcInterface(std::shared_ptr<T> iface) { |
| 148 | if (context->Session()->IsDomain()) { | 149 | if (context->Session()->GetSessionRequestManager()->IsDomain()) { |
| 149 | context->AddDomainObject(std::move(iface)); | 150 | context->AddDomainObject(std::move(iface)); |
| 150 | } else { | 151 | } else { |
| 151 | kernel.CurrentProcess()->GetResourceLimit()->Reserve( | 152 | kernel.CurrentProcess()->GetResourceLimit()->Reserve( |
| @@ -386,7 +387,7 @@ public: | |||
| 386 | 387 | ||
| 387 | template <class T> | 388 | template <class T> |
| 388 | std::weak_ptr<T> PopIpcInterface() { | 389 | std::weak_ptr<T> PopIpcInterface() { |
| 389 | ASSERT(context->Session()->IsDomain()); | 390 | ASSERT(context->Session()->GetSessionRequestManager()->IsDomain()); |
| 390 | ASSERT(context->GetDomainMessageHeader().input_object_count > 0); | 391 | ASSERT(context->GetDomainMessageHeader().input_object_count > 0); |
| 391 | return context->GetDomainHandler<T>(Pop<u32>() - 1); | 392 | return context->GetDomainHandler<T>(Pop<u32>() - 1); |
| 392 | } | 393 | } |