diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-24 02:00:15 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:52 +0200 |
commit | 626f746971d1d3216a38b20680959df3a1f5f256 (patch) | |
tree | d9b9448732e264e84557e12d7a14a40f00cb006f /src/core/hle/service/sm/sm.h | |
parent | hle: kernel: Migrate KServerPort to KAutoObject. (diff) | |
download | yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar.gz yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar.bz2 yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar.lz yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar.xz yuzu-626f746971d1d3216a38b20680959df3a1f5f256.tar.zst yuzu-626f746971d1d3216a38b20680959df3a1f5f256.zip |
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; |