summaryrefslogtreecommitdiffstats
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-18 22:26:48 +0100
committerLiam <byteslice@airmail.cc>2023-02-21 18:19:25 +0100
commita9369726147c7499e0016e183d5d56a7b44efe4b (patch)
treec1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/ipc_helpers.h
parentcore: defer cpu shutdown (diff)
downloadyuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.gz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.bz2
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.lz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.xz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.zst
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/ipc_helpers.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 38d6cfaff..f8ab55d83 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -15,6 +15,7 @@
#include "core/hle/kernel/k_resource_limit.h"
#include "core/hle/kernel/k_session.h"
#include "core/hle/result.h"
+#include "core/hle/service/server_manager.h"
namespace IPC {
@@ -145,7 +146,9 @@ public:
template <class T>
void PushIpcInterface(std::shared_ptr<T> iface) {
- if (context->GetManager()->IsDomain()) {
+ auto manager{context->GetManager()};
+
+ if (manager->IsDomain()) {
context->AddDomainObject(std::move(iface));
} else {
kernel.ApplicationProcess()->GetResourceLimit()->Reserve(
@@ -153,8 +156,11 @@ public:
auto* session = Kernel::KSession::Create(kernel);
session->Initialize(nullptr, iface->GetServiceName());
- iface->RegisterSession(&session->GetServerSession(),
- std::make_shared<Kernel::SessionRequestManager>(kernel));
+
+ auto next_manager = std::make_shared<Kernel::SessionRequestManager>(
+ kernel, manager->GetServerManager());
+ next_manager->SetSessionHandler(iface);
+ manager->GetServerManager().RegisterSession(&session->GetServerSession(), next_manager);
context->AddMoveObject(&session->GetClientSession());
}