summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2021-06-09 22:04:36 -0700
committerGravatar bunnei2021-06-09 22:04:36 -0700
commit2aa6a8d889e91cf999a9e95d18d06f455c337288 (patch)
treeb735ae978d72d01921769475842af4588885c82b /src
parenthle: kernel: KServerSession: Fix client disconnected. (diff)
downloadyuzu-2aa6a8d889e91cf999a9e95d18d06f455c337288.tar.gz
yuzu-2aa6a8d889e91cf999a9e95d18d06f455c337288.tar.xz
yuzu-2aa6a8d889e91cf999a9e95d18d06f455c337288.zip
hle: service: Use correct size for ServerSessionCountMax.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/service.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 78afd7c73..e078ac176 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -40,9 +40,11 @@ namespace SM {
40class ServiceManager; 40class ServiceManager;
41} 41}
42 42
43static const int kMaxPortSize = 8; ///< Maximum size of a port name (8 characters) 43/// Default number of maximum connections to a server session.
44/// Arbitrary default number of maximum connections to an HLE service. 44static constexpr u32 ServerSessionCountMax = 0x40;
45static const u32 DefaultMaxSessions = 0x100; 45static_assert(ServerSessionCountMax == 0x40,
46 "ServerSessionCountMax isn't 0x40 somehow, this assert is a reminder that this will "
47 "break lots of things");
46 48
47/** 49/**
48 * This is an non-templated base of ServiceFramework to reduce code bloat and compilation times, it 50 * This is an non-templated base of ServiceFramework to reduce code bloat and compilation times, it
@@ -178,7 +180,7 @@ protected:
178 * connected to this service at the same time. 180 * connected to this service at the same time.
179 */ 181 */
180 explicit ServiceFramework(Core::System& system_, const char* service_name_, 182 explicit ServiceFramework(Core::System& system_, const char* service_name_,
181 u32 max_sessions_ = DefaultMaxSessions) 183 u32 max_sessions_ = ServerSessionCountMax)
182 : ServiceFrameworkBase(system_, service_name_, max_sessions_, Invoker) {} 184 : ServiceFrameworkBase(system_, service_name_, max_sessions_, Invoker) {}
183 185
184 /// Registers handlers in the service. 186 /// Registers handlers in the service.