service: Undo plgldr change

This commit is contained in:
GPUCode
2024-01-06 01:48:27 +02:00
parent 0e4e8aa45a
commit c23f367262

View File

@ -288,10 +288,12 @@ void PLG_LDR::GetPluginPath(Kernel::HLERequestContext& ctx) {
} }
std::shared_ptr<PLG_LDR> GetService(Core::System& system) { std::shared_ptr<PLG_LDR> GetService(Core::System& system) {
if (!system.IsPoweredOn()) { if (!system.KernelRunning())
return nullptr; return nullptr;
} auto it = system.Kernel().named_ports.find("plg:ldr");
return system.ServiceManager().GetService<PLG_LDR>("plg:ldr"); if (it != system.Kernel().named_ports.end())
return std::static_pointer_cast<PLG_LDR>(it->second->GetServerPort()->hle_handler);
return nullptr;
} }
void InstallInterfaces(Core::System& system) { void InstallInterfaces(Core::System& system) {