aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/srv.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-01-30 16:07:04 -0200
committerGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2015-02-02 15:36:59 -0200
commit8779b31fe60c728ace89a9b5128b68feffa9c7d7 (patch)
treeb83440cbe4187f1fe120a5a247919a1ecbb1c65d /src/core/hle/service/srv.cpp
parent5e91fc0d1aa806a9635e06e047d5367988f21093 (diff)
Make Port/Service registration and querying more HW-accurate
Diffstat (limited to 'src/core/hle/service/srv.cpp')
-rw-r--r--src/core/hle/service/srv.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index aa0aac3b..c50aebf1 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -35,10 +35,10 @@ static void GetServiceHandle(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
std::string port_name = std::string((const char*)&cmd_buff[1], 0, Service::kMaxPortSize);
- Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
+ auto it = Service::g_srv_services.find(port_name);
- if (nullptr != service) {
- cmd_buff[3] = service->GetHandle();
+ if (it != Service::g_srv_services.end()) {
+ cmd_buff[3] = Kernel::g_handle_table.Create(it->second).MoveFrom();
LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]);
} else {
LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str());