summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-11 00:58:33 +0200
committerbunnei <bunneidev@gmail.com>2021-05-11 05:34:38 +0200
commitf54ea749a4a593f63f75f6d21550534eac5eec8c (patch)
treed1fbe6ab3202215231e193866267e01cc8aa1887
parenthle: kernel: Implement named service ports using service interface factory. (diff)
downloadyuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.gz
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.bz2
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.lz
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.xz
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.zst
yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.zip
-rw-r--r--src/core/hle/kernel/svc.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 52011be9c..6b445677e 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -284,12 +284,11 @@ static ResultCode ConnectToNamedPort(Core::System& system, Handle* out, VAddr po
auto& handle_table = kernel.CurrentProcess()->GetHandleTable();
// Find the client port.
- const auto it = kernel.FindNamedPort(port_name);
- if (!kernel.IsValidNamedPort(it)) {
- LOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
+ auto port = kernel.CreateNamedServicePort(port_name);
+ if (!port) {
+ LOG_ERROR(Kernel_SVC, "tried to connect to unknown port: {}", port_name);
return ResultNotFound;
}
- auto port = it->second;
// Reserve a handle for the port.
// NOTE: Nintendo really does write directly to the output handle here.