diff options
Diffstat (limited to 'src/core/hle/service/sm/sm.h')
-rw-r--r-- | src/core/hle/service/sm/sm.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h index b0204c4bb..af5010c3b 100644 --- a/src/core/hle/service/sm/sm.h +++ b/src/core/hle/service/sm/sm.h @@ -10,9 +10,7 @@ #include <unordered_map> #include "common/concepts.h" -#include "core/hle/kernel/k_client_port.h" -#include "core/hle/kernel/k_server_port.h" -#include "core/hle/kernel/object.h" +#include "core/hle/kernel/k_port.h" #include "core/hle/result.h" #include "core/hle/service/service.h" @@ -24,6 +22,7 @@ namespace Kernel { class KClientPort; class KClientSession; class KernelCore; +class KPort; class KServerPort; class SessionRequestHandler; } // namespace Kernel @@ -57,7 +56,7 @@ public: ResultVal<Kernel::KServerPort*> RegisterService(std::string name, u32 max_sessions); ResultCode UnregisterService(const std::string& name); - ResultVal<Kernel::KClientPort*> GetServicePort(const std::string& name); + ResultVal<Kernel::KPort*> GetServicePort(const std::string& name); template <Common::DerivedFrom<Kernel::SessionRequestHandler> T> std::shared_ptr<T> GetService(const std::string& service_name) const { @@ -66,11 +65,11 @@ public: LOG_DEBUG(Service, "Can't find service: {}", service_name); return nullptr; } - auto port = service->second->GetServerPort(); + auto* port = service->second; if (port == nullptr) { return nullptr; } - return std::static_pointer_cast<T>(port->GetHLEHandler()); + return std::static_pointer_cast<T>(port->GetServerPort().GetHLEHandler()); } void InvokeControlRequest(Kernel::HLERequestContext& context); @@ -80,7 +79,7 @@ private: std::unique_ptr<Controller> controller_interface; /// Map of registered services, retrieved using GetServicePort. - std::unordered_map<std::string, Kernel::KClientPort*> registered_services; + std::unordered_map<std::string, Kernel::KPort*> registered_services; /// Kernel context Kernel::KernelCore& kernel; |