diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index f30f8739c..aae14f09e 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -35,7 +35,7 @@ HLERequestContext::~HLERequestContext() = default; void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { IPC::RequestParser rp(src_cmdbuf); - command_header = std::make_unique(rp.PopRaw()); + command_header = std::make_shared(rp.PopRaw()); if (command_header->type == IPC::CommandType::Close) { // Close does not populate the rest of the IPC header @@ -45,7 +45,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { // If handle descriptor is present, add size of it if (command_header->enable_handle_descriptor) { handle_descriptor_header = - std::make_unique(rp.PopRaw()); + std::make_shared(rp.PopRaw()); if (handle_descriptor_header->send_current_pid) { rp.Skip(2, false); } @@ -88,7 +88,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { // All outgoing domain messages have the domain header, if only incoming has it if (incoming || domain_message_header) { domain_message_header = - std::make_unique(rp.PopRaw()); + std::make_shared(rp.PopRaw()); } else { if (Session()->IsDomain()) LOG_WARNING(IPC, "Domain request has no DomainMessageHeader!"); @@ -96,7 +96,7 @@ void HLERequestContext::ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming) { } data_payload_header = - std::make_unique(rp.PopRaw()); + std::make_shared(rp.PopRaw()); data_payload_offset = rp.GetCurrentOffset(); diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 743835f18..b5cc0d0af 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -139,7 +139,7 @@ public: return buffer_c_desciptors; } - const std::unique_ptr& GetDomainMessageHeader() const { + const std::shared_ptr& GetDomainMessageHeader() const { return domain_message_header; } @@ -212,10 +212,10 @@ private: boost::container::small_vector, 8> copy_objects; boost::container::small_vector, 8> domain_objects; - std::unique_ptr command_header; - std::unique_ptr handle_descriptor_header; - std::unique_ptr data_payload_header; - std::unique_ptr domain_message_header; + std::shared_ptr command_header; + std::shared_ptr handle_descriptor_header; + std::shared_ptr data_payload_header; + std::shared_ptr domain_message_header; std::vector buffer_x_desciptors; std::vector buffer_a_desciptors; std::vector buffer_b_desciptors;