mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-10 18:07:56 -05:00
hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
This commit is contained in:
@ -111,7 +111,7 @@ void ServiceFrameworkBase::InstallAsService(SM::ServiceManager& service_manager)
|
||||
port_installed = true;
|
||||
}
|
||||
|
||||
void ServiceFrameworkBase::InstallAsNamedPort(Kernel::KernelCore& kernel) {
|
||||
Kernel::KClientPort& ServiceFrameworkBase::CreatePort(Kernel::KernelCore& kernel) {
|
||||
const auto guard = LockService();
|
||||
|
||||
ASSERT(!port_installed);
|
||||
@ -119,9 +119,10 @@ void ServiceFrameworkBase::InstallAsNamedPort(Kernel::KernelCore& kernel) {
|
||||
auto* port = Kernel::KPort::Create(kernel);
|
||||
port->Initialize(max_sessions, false, service_name);
|
||||
port->GetServerPort().SetHleHandler(shared_from_this());
|
||||
kernel.AddNamedPort(service_name, &port->GetClientPort());
|
||||
|
||||
port_installed = true;
|
||||
|
||||
return port->GetClientPort();
|
||||
}
|
||||
|
||||
void ServiceFrameworkBase::RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n) {
|
||||
|
Reference in New Issue
Block a user