summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-06 17:04:02 +0200
committerGitHub <noreply@github.com>2017-06-06 17:04:02 +0200
commitfc1bd06192a10b52425b76880531b520dd68e86d (patch)
treebe459930c35e50f698ef7747730092116eea6a74 /src/core/hle/service/service.cpp
parentMerge pull request #2752 from yuriks/move-session-request-handler (diff)
parentKernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession (diff)
downloadyuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar.gz
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar.bz2
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar.lz
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar.xz
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.tar.zst
yuzu-fc1bd06192a10b52425b76880531b520dd68e86d.zip
Diffstat (limited to 'src/core/hle/service/service.cpp')
-rw-r--r--src/core/hle/service/service.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index bb22e25be..8f7c97d54 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -105,18 +105,22 @@ void Interface::Register(const FunctionInfo* functions, size_t n) {
// Module interface
static void AddNamedPort(Interface* interface_) {
- auto ports =
- Kernel::ServerPort::CreatePortPair(interface_->GetMaxSessions(), interface_->GetPortName(),
- std::shared_ptr<Interface>(interface_));
- auto client_port = std::get<Kernel::SharedPtr<Kernel::ClientPort>>(ports);
+ Kernel::SharedPtr<Kernel::ServerPort> server_port;
+ Kernel::SharedPtr<Kernel::ClientPort> client_port;
+ std::tie(server_port, client_port) =
+ Kernel::ServerPort::CreatePortPair(interface_->GetMaxSessions(), interface_->GetPortName());
+
+ server_port->SetHleHandler(std::shared_ptr<Interface>(interface_));
g_kernel_named_ports.emplace(interface_->GetPortName(), std::move(client_port));
}
void AddService(Interface* interface_) {
- auto ports =
- Kernel::ServerPort::CreatePortPair(interface_->GetMaxSessions(), interface_->GetPortName(),
- std::shared_ptr<Interface>(interface_));
- auto client_port = std::get<Kernel::SharedPtr<Kernel::ClientPort>>(ports);
+ Kernel::SharedPtr<Kernel::ServerPort> server_port;
+ Kernel::SharedPtr<Kernel::ClientPort> client_port;
+ std::tie(server_port, client_port) =
+ Kernel::ServerPort::CreatePortPair(interface_->GetMaxSessions(), interface_->GetPortName());
+
+ server_port->SetHleHandler(std::shared_ptr<Interface>(interface_));
g_srv_services.emplace(interface_->GetPortName(), std::move(client_port));
}