aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/sm/sm.cpp
diff options
context:
space:
mode:
authorbunnei <[email protected]>2021-04-03 21:21:22 -0700
committerbunnei <[email protected]>2021-05-05 16:40:50 -0700
commit5e5933256b022f6890fc3f14164ae9e9c3ee9ae3 (patch)
treef65bdacde0afe5465446f90e26f2da1b8126cda9 /src/core/hle/service/sm/sm.cpp
parentda7e9553dea4b1eaefb71aca8642ccce7c7f50fb (diff)
downloadyuzu-android-5e5933256b022f6890fc3f14164ae9e9c3ee9ae3.tar.gz
yuzu-android-5e5933256b022f6890fc3f14164ae9e9c3ee9ae3.zip
hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.
Diffstat (limited to 'src/core/hle/service/sm/sm.cpp')
-rw-r--r--src/core/hle/service/sm/sm.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index 94608d529..62f7a5358 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -134,7 +134,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
const auto& server_port = client_port.Unwrap()->GetServerPort();
if (server_port->GetHLEHandler()) {
- server_port->GetHLEHandler()->ClientConnected(server);
+ server_port->GetHLEHandler()->ClientConnected(client, server);
} else {
server_port->AppendPendingSession(server);
}
@@ -142,7 +142,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_SM, "called service={} -> session={}", name, client->GetObjectId());
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};
rb.Push(RESULT_SUCCESS);
- rb.PushMoveObjects(std::move(client));
+ rb.PushMoveObjects(client.get());
}
void SM::RegisterService(Kernel::HLERequestContext& ctx) {
@@ -170,7 +170,9 @@ void SM::RegisterService(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 0, 1, IPC::ResponseBuilder::Flags::AlwaysMoveHandles};
rb.Push(handle.Code());
- rb.PushMoveObjects(std::move(handle).Unwrap());
+
+ auto server_port = handle.Unwrap();
+ rb.PushMoveObjects(server_port.get());
}
void SM::UnregisterService(Kernel::HLERequestContext& ctx) {