summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sm/sm.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-17 16:43:54 +0200
committerLioncash <mathew1800@gmail.com>2020-09-17 16:43:54 +0200
commit78b1bc3b619dd441d10f1131bca7ccf260ed4e80 (patch)
tree394f464eea66ce00ea7a8092d73f337a1470198c /src/core/hle/service/sm/sm.cpp
parentMerge pull request #4653 from ReinUsesLisp/gc-warns (diff)
downloadyuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar.gz
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar.bz2
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar.lz
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar.xz
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.tar.zst
yuzu-78b1bc3b619dd441d10f1131bca7ccf260ed4e80.zip
Diffstat (limited to 'src/core/hle/service/sm/sm.cpp')
-rw-r--r--src/core/hle/service/sm/sm.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index 586b3d8eb..2aedc93ea 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -19,7 +19,7 @@ constexpr ResultCode ERR_ALREADY_REGISTERED(ErrorModule::SM, 4);
constexpr ResultCode ERR_INVALID_NAME(ErrorModule::SM, 6);
constexpr ResultCode ERR_SERVICE_NOT_REGISTERED(ErrorModule::SM, 7);
-ServiceManager::ServiceManager() = default;
+ServiceManager::ServiceManager(Kernel::KernelCore& kernel_) : kernel{kernel_} {}
ServiceManager::~ServiceManager() = default;
void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) {
@@ -48,8 +48,8 @@ void ServiceManager::InstallInterfaces(std::shared_ptr<ServiceManager> self,
self->controller_interface = std::make_unique<Controller>();
}
-ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService(
- std::string name, unsigned int max_sessions) {
+ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService(std::string name,
+ u32 max_sessions) {
CASCADE_CODE(ValidateServiceName(name));
@@ -58,7 +58,6 @@ ResultVal<std::shared_ptr<Kernel::ServerPort>> ServiceManager::RegisterService(
return ERR_ALREADY_REGISTERED;
}
- auto& kernel = Core::System::GetInstance().Kernel();
auto [server_port, client_port] =
Kernel::ServerPort::CreatePortPair(kernel, max_sessions, name);