From c12c756539454908cf9868fc63d2425b3c87b1a3 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 7 Jan 2018 10:39:57 -0500 Subject: IPC: Make DuplicateSession return the Domain instead of the Session if the request was made on a Domain interface. --- src/core/hle/service/sm/controller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/sm/controller.cpp') diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index 392a3b2fe..ae38b6bb0 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -23,7 +23,11 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) { void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { IPC::RequestBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushMoveObjects(ctx.ServerSession()); + // TODO(Subv): Check if this is correct + if (ctx.IsDomain()) + rb.PushMoveObjects(ctx.Domain()); + else + rb.PushMoveObjects(ctx.ServerSession()); LOG_DEBUG(Service, "called"); } -- cgit v1.2.3