1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-17 17:36:44 +00:00

tipc: implement special-case templating used by 13.0.0 pgl

This commit is contained in:
Michael Scire 2021-10-15 21:20:52 -07:00
parent ff5f376c33
commit 2541f6dd71
2 changed files with 695 additions and 492 deletions

View file

@ -29,7 +29,7 @@ namespace ams::pgl::srv {
};
constexpr sm::ServiceName ShellServiceName = sm::ServiceName::Encode("pgl");
constexpr size_t ShellMaxSessions = 8; /* Official maximum is 8. */
constexpr size_t ShellMaxSessions = 8; /* Official maximum is 6. */
using CmifServerManager = ams::sf::hipc::ServerManager<PortIndex_Count>;
@ -113,7 +113,7 @@ namespace ams::pgl::srv {
globals.server_manager.Initialize();
/* Register the pgl service. */
globals.server_manager.RegisterPort<PortIndex_Shell>(ShellServiceName, ShellMaxSessions);
globals.server_manager.RegisterPort(ShellServiceName, ShellMaxSessions);
} else {
/* Get the globals. */
auto &globals = GetGlobalsForCmif();
@ -192,16 +192,4 @@ namespace ams::pgl::srv {
return ResultSuccess();
}
ams::tipc::ServiceObjectBase *AllocateShellEventObserverForTipc() {
auto &allocator = GetGlobalsForTipc().observer_allocator;
auto *object = allocator.Allocate();
if (object != nullptr) {
object->SetDeleter(std::addressof(allocator));
}
return object;
}
}