diff options
| author | 2021-05-10 15:58:33 -0700 | |
|---|---|---|
| committer | 2021-05-10 20:34:38 -0700 | |
| commit | f54ea749a4a593f63f75f6d21550534eac5eec8c (patch) | |
| tree | d1fbe6ab3202215231e193866267e01cc8aa1887 /src | |
| parent | hle: kernel: Implement named service ports using service interface factory. (diff) | |
| download | yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.gz yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.tar.xz yuzu-f54ea749a4a593f63f75f6d21550534eac5eec8c.zip | |
hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 7 |
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 | |||
| 284 | auto& handle_table = kernel.CurrentProcess()->GetHandleTable(); | 284 | auto& handle_table = kernel.CurrentProcess()->GetHandleTable(); |
| 285 | 285 | ||
| 286 | // Find the client port. | 286 | // Find the client port. |
| 287 | const auto it = kernel.FindNamedPort(port_name); | 287 | auto port = kernel.CreateNamedServicePort(port_name); |
| 288 | if (!kernel.IsValidNamedPort(it)) { | 288 | if (!port) { |
| 289 | LOG_WARNING(Kernel_SVC, "tried to connect to unknown port: {}", port_name); | 289 | LOG_ERROR(Kernel_SVC, "tried to connect to unknown port: {}", port_name); |
| 290 | return ResultNotFound; | 290 | return ResultNotFound; |
| 291 | } | 291 | } |
| 292 | auto port = it->second; | ||
| 293 | 292 | ||
| 294 | // Reserve a handle for the port. | 293 | // Reserve a handle for the port. |
| 295 | // NOTE: Nintendo really does write directly to the output handle here. | 294 | // NOTE: Nintendo really does write directly to the output handle here. |