diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 4292e0d38..0048c03c2 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -75,13 +75,13 @@ public: */ bool IsWaitable() const { switch (GetHandleType()) { - case HandleType::ServerSession: - case HandleType::ServerPort: case HandleType::Event: case HandleType::Mutex: case HandleType::Thread: case HandleType::Semaphore: case HandleType::Timer: + case HandleType::ServerPort: + case HandleType::ServerSession: return true; case HandleType::Unknown: @@ -92,6 +92,7 @@ public: case HandleType::ResourceLimit: case HandleType::CodeSet: case HandleType::ClientPort: + case HandleType::ClientSession: return false; } } diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 9f5350ce5..720c0eb94 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -48,7 +48,7 @@ SharedPtr ServerSession::CreateClientSession() { return ClientSession::Create(SharedPtr(this), nullptr, name + "Client").MoveFrom(); } -std::tuple, SharedPtr> ServerSession::CreateSessionPair(SharedPtr client_port, std::string name) { +std::tuple, SharedPtr> ServerSession::CreateSessionPair(SharedPtr client_port, const std::string& name) { auto server_session = ServerSession::Create(name + "Server").MoveFrom(); auto client_session = ClientSession::Create(server_session, client_port, name + "Client").MoveFrom(); diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 74f6ff706..178412150 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -102,7 +102,7 @@ public: * @param name Optional name of the ports * @return The created session tuple */ - static std::tuple, SharedPtr> CreateSessionPair(SharedPtr client_port, std::string name = "Unknown"); + static std::tuple, SharedPtr> CreateSessionPair(SharedPtr client_port, const std::string& name = "Unknown"); /** * Creates a portless ClientSession and associates it with this ServerSession. diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 563f4e384..f0f6cf8ee 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -37,7 +37,7 @@ public: * It should be overwritten by each service implementation for more fine-grained control. * @returns The maximum number of connections allowed. */ - virtual u32 GetMaxSessions() { return DefaultMaxSessions; } + virtual u32 GetMaxSessions() const { return DefaultMaxSessions; } void AddWaitingSession(Kernel::SharedPtr server_session) override { }