From 6a0010d0c64ff3e023d8f16e543dfaf73c531179 Mon Sep 17 00:00:00 2001 From: VolcaEM <63682805+VolcaEM@users.noreply.github.com> Date: Mon, 29 Jun 2020 04:01:34 +0200 Subject: service: Update function tables --- src/core/hle/service/sm/controller.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (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 9cca84b31..25ab667f3 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -12,7 +12,7 @@ namespace Service::SM { -void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) { +void Controller::ConvertCurrentObjectToDomain(Kernel::HLERequestContext& ctx) { ASSERT_MSG(ctx.Session()->IsSession(), "Session is already a domain"); LOG_DEBUG(Service, "called, server_session={}", ctx.Session()->GetObjectId()); ctx.Session()->ConvertToDomain(); @@ -22,7 +22,7 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) { rb.Push(1); // Converted sessions start with 1 request handler } -void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { +void Controller::CloneCurrentObject(Kernel::HLERequestContext& ctx) { // TODO(bunnei): This is just creating a new handle to the same Session. I assume this is wrong // and that we probably want to actually make an entirely new Session, but we still need to // verify this on hardware. @@ -33,10 +33,10 @@ void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { rb.PushMoveObjects(ctx.Session()->GetParent()->Client()); } -void Controller::DuplicateSessionEx(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service, "(STUBBED) called, using DuplicateSession"); +void Controller::CloneCurrentObjectEx(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service, "(STUBBED) called, using CloneCurrentObject"); - DuplicateSession(ctx); + CloneCurrentObject(ctx); } void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { @@ -47,13 +47,14 @@ void Controller::QueryPointerBufferSize(Kernel::HLERequestContext& ctx) { rb.Push(0x1000); } +// https://switchbrew.org/wiki/IPC_Marshalling Controller::Controller() : ServiceFramework("IpcController") { static const FunctionInfo functions[] = { - {0x00000000, &Controller::ConvertSessionToDomain, "ConvertSessionToDomain"}, - {0x00000001, nullptr, "ConvertDomainToSession"}, - {0x00000002, &Controller::DuplicateSession, "DuplicateSession"}, + {0x00000000, &Controller::ConvertCurrentObjectToDomain, "ConvertCurrentObjectToDomain"}, + {0x00000001, nullptr, "CopyFromCurrentDomain"}, + {0x00000002, &Controller::CloneCurrentObject, "CloneCurrentObject"}, {0x00000003, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"}, - {0x00000004, &Controller::DuplicateSessionEx, "DuplicateSessionEx"}, + {0x00000004, &Controller::CloneCurrentObjectEx, "CloneCurrentObjectEx"}, }; RegisterHandlers(functions); } -- cgit v1.2.3