diff options
author | bunnei <bunneidev@gmail.com> | 2017-12-29 06:36:22 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-12-29 06:36:22 +0100 |
commit | dcdaac8a0b5ae5b8d251c3713d3024287b0720b1 (patch) | |
tree | 35cb5631e4d00d1582aa238cf93abdc73b6afa8a /src/core/hle/service/sm/controller.cpp | |
parent | ap, aoc_u: Minor cleanup. (diff) | |
download | yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.gz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.bz2 yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.lz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.xz yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.tar.zst yuzu-dcdaac8a0b5ae5b8d251c3713d3024287b0720b1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/sm/controller.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp index 414a7d809..1d7ab3a1c 100644 --- a/src/core/hle/service/sm/controller.cpp +++ b/src/core/hle/service/sm/controller.cpp @@ -4,27 +4,21 @@ #include "common/logging/log.h" #include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/domain.h" #include "core/hle/service/sm/controller.h" namespace Service { namespace SM { -/** - * Controller::ConvertSessionToDomain service function - * Inputs: - * 0: 0x00000000 - * Outputs: - * 0: ResultCode - * 2: Handle of domain - */ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) { - ctx.Session()->ConvertToDomain(); + auto domain = Kernel::Domain::CreateFromSession(*ctx.ServerSession()->parent).Unwrap(); + IPC::RequestBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); rb.Skip(1, true); - Kernel::Handle handle = Kernel::g_handle_table.Create(ctx.Session()).Unwrap(); - rb.Push(handle); - LOG_DEBUG(Service, "called, handle=0x%08x", handle); + rb.Push<u32>(static_cast<u32>(domain->request_handlers.size())); + + LOG_DEBUG(Service, "called, domain=%d", domain->GetObjectId()); } /** |