diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/cmif_serialization.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/cmif_types.h | 10 | ||||
| -rw-r--r-- | src/core/hle/service/hle_ipc.cpp | 8 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/core/hle/service/cmif_serialization.h b/src/core/hle/service/cmif_serialization.h index e985fe317..f24682c34 100644 --- a/src/core/hle/service/cmif_serialization.h +++ b/src/core/hle/service/cmif_serialization.h | |||
| @@ -280,7 +280,7 @@ void ReadInArgument(bool is_domain, CallArguments& args, const u8* raw_data, HLE | |||
| 280 | 280 | ||
| 281 | u32 value{}; | 281 | u32 value{}; |
| 282 | std::memcpy(&value, raw_data + ArgOffset, ArgSize); | 282 | std::memcpy(&value, raw_data + ArgOffset, ArgSize); |
| 283 | std::get<ArgIndex>(args) = ctx.GetDomainHandler<ArgType::Type>(value - 1); | 283 | std::get<ArgIndex>(args) = ctx.GetDomainHandler<typename ArgType::element_type>(value - 1); |
| 284 | 284 | ||
| 285 | return ReadInArgument<MethodArguments, CallArguments, ArgAlign, ArgEnd, HandleIndex, InBufferIndex, OutBufferIndex, true, ArgIndex + 1>(is_domain, args, raw_data, ctx, temp); | 285 | return ReadInArgument<MethodArguments, CallArguments, ArgAlign, ArgEnd, HandleIndex, InBufferIndex, OutBufferIndex, true, ArgIndex + 1>(is_domain, args, raw_data, ctx, temp); |
| 286 | } else if constexpr (ArgumentTraits<ArgType>::Type == ArgumentType::InCopyHandle) { | 286 | } else if constexpr (ArgumentTraits<ArgType>::Type == ArgumentType::InCopyHandle) { |
diff --git a/src/core/hle/service/cmif_types.h b/src/core/hle/service/cmif_types.h index 84f4c2456..db5a013c7 100644 --- a/src/core/hle/service/cmif_types.h +++ b/src/core/hle/service/cmif_types.h | |||
| @@ -65,6 +65,14 @@ struct ClientProcessId { | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | struct ProcessId { | 67 | struct ProcessId { |
| 68 | explicit ProcessId() : pid() {} | ||
| 69 | explicit ProcessId(u64 p) : pid(p) {} | ||
| 70 | /* implicit */ ProcessId(const ClientProcessId& c) : pid(c.pid) {} | ||
| 71 | |||
| 72 | bool operator==(const ProcessId& rhs) const { | ||
| 73 | return pid == rhs.pid; | ||
| 74 | } | ||
| 75 | |||
| 68 | explicit operator bool() const { | 76 | explicit operator bool() const { |
| 69 | return pid != 0; | 77 | return pid != 0; |
| 70 | } | 78 | } |
| @@ -291,4 +299,4 @@ private: | |||
| 291 | }; | 299 | }; |
| 292 | // clang-format on | 300 | // clang-format on |
| 293 | 301 | ||
| 294 | } // namespace Service \ No newline at end of file | 302 | } // namespace Service |
diff --git a/src/core/hle/service/hle_ipc.cpp b/src/core/hle/service/hle_ipc.cpp index 50e1ed756..e0367e774 100644 --- a/src/core/hle/service/hle_ipc.cpp +++ b/src/core/hle/service/hle_ipc.cpp | |||
| @@ -299,8 +299,12 @@ Result HLERequestContext::WriteToOutgoingCommandBuffer() { | |||
| 299 | if (GetManager()->IsDomain()) { | 299 | if (GetManager()->IsDomain()) { |
| 300 | current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size()); | 300 | current_offset = domain_offset - static_cast<u32>(outgoing_domain_objects.size()); |
| 301 | for (auto& object : outgoing_domain_objects) { | 301 | for (auto& object : outgoing_domain_objects) { |
| 302 | GetManager()->AppendDomainHandler(std::move(object)); | 302 | if (object) { |
| 303 | cmd_buf[current_offset++] = static_cast<u32_le>(GetManager()->DomainHandlerCount()); | 303 | GetManager()->AppendDomainHandler(std::move(object)); |
| 304 | cmd_buf[current_offset++] = static_cast<u32_le>(GetManager()->DomainHandlerCount()); | ||
| 305 | } else { | ||
| 306 | cmd_buf[current_offset++] = 0; | ||
| 307 | } | ||
| 304 | } | 308 | } |
| 305 | } | 309 | } |
| 306 | 310 | ||