mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-18 17:05:25 +00:00
[hle] Enforce max_sessions, add bpc:ams service (#4394)
As per switchbrew, as per atmosphere, and some poking around. bpc:ams stubbed for now. Signed-off-by: lizzie <lizzie@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4394 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
@@ -53,8 +53,7 @@ static Result ValidateServiceName(const std::string& name) {
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result ServiceManager::RegisterService(Kernel::KServerPort** out_server_port, std::string name,
|
||||
u32 max_sessions, SessionRequestHandlerFactory handler) {
|
||||
Result ServiceManager::RegisterService(Kernel::KServerPort** out_server_port, std::string name, u32 max_sessions, SessionRequestHandlerFactory handler) {
|
||||
R_TRY(ValidateServiceName(name));
|
||||
|
||||
std::scoped_lock lk{lock};
|
||||
@@ -64,7 +63,7 @@ Result ServiceManager::RegisterService(Kernel::KServerPort** out_server_port, st
|
||||
}
|
||||
|
||||
auto* port = Kernel::KPort::Create(kernel);
|
||||
port->Initialize(kernel, ServerSessionCountMax, false, 0);
|
||||
port->Initialize(kernel, max_sessions, false, 0);
|
||||
|
||||
// Register the port.
|
||||
Kernel::KPort::Register(kernel, port);
|
||||
@@ -264,7 +263,7 @@ void SM::AtmosphereHasService(HLERequestContext& ctx) {
|
||||
}
|
||||
|
||||
SM::SM(ServiceManager& service_manager_, Core::System& system_)
|
||||
: ServiceFramework{system_, "sm:", 4}
|
||||
: ServiceFramework{system_, "sm:", 64}
|
||||
, service_manager{service_manager_}
|
||||
, kernel{system_.Kernel()}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user