summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-24 00:03:09 +0100
committerbunnei <bunneidev@gmail.com>2018-01-25 04:18:56 +0100
commit27bad0598a3ddce0417388c3945368200150d413 (patch)
tree8afc27be2a01d80cc592a698632b2fbcae71d8a5 /src/core/hle/service
parenthle: Remove Domain and SyncObject kernel objects. (diff)
downloadyuzu-27bad0598a3ddce0417388c3945368200150d413.tar
yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.gz
yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.bz2
yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.lz
yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.xz
yuzu-27bad0598a3ddce0417388c3945368200150d413.tar.zst
yuzu-27bad0598a3ddce0417388c3945368200150d413.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/sm/controller.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp
index e91d9d856..3eead315a 100644
--- a/src/core/hle/service/sm/controller.cpp
+++ b/src/core/hle/service/sm/controller.cpp
@@ -10,23 +10,21 @@ namespace Service {
namespace SM {
void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
- auto domain = Kernel::Domain::CreateFromSession(*ctx.ServerSession()->parent).Unwrap();
+ ASSERT_MSG(!ctx.Session()->IsDomain(), "session is alread a domain");
+ ctx.Session()->ConvertToDomain();
IPC::RequestBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push(static_cast<u32>(domain->request_handlers.size()));
+ rb.Push<u32>(1); // Converted sessions start with 1 request handler
- LOG_DEBUG(Service, "called, domain=%d", domain->GetObjectId());
+ LOG_DEBUG(Service, "called, server_session=%d", ctx.Session()->GetObjectId());
}
void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
IPC::RequestBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
// TODO(Subv): Check if this is correct
- if (ctx.IsDomain())
- rb.PushMoveObjects(ctx.Domain());
- else
- rb.PushMoveObjects(ctx.ServerSession());
+ rb.PushMoveObjects(ctx.Session());
LOG_DEBUG(Service, "called");
}