diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/fatal/fatal.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp index 2e5919330..fe2ed8df8 100644 --- a/src/core/hle/service/fatal/fatal.cpp +++ b/src/core/hle/service/fatal/fatal.cpp @@ -9,10 +9,11 @@ #include "common/scm_rev.h" #include "common/swap.h" #include "core/core.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/service/fatal/fatal.h" #include "core/hle/service/fatal/fatal_p.h" #include "core/hle/service/fatal/fatal_u.h" +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/server_manager.h" #include "core/reporter.h" namespace Service::Fatal { @@ -125,7 +126,7 @@ static void ThrowFatalError(Core::System& system, Result error_code, FatalType f } } -void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { +void Module::Interface::ThrowFatal(HLERequestContext& ctx) { LOG_ERROR(Service_Fatal, "called"); IPC::RequestParser rp{ctx}; const auto error_code = rp.Pop<Result>(); @@ -135,7 +136,7 @@ void Module::Interface::ThrowFatal(Kernel::HLERequestContext& ctx) { rb.Push(ResultSuccess); } -void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { +void Module::Interface::ThrowFatalWithPolicy(HLERequestContext& ctx) { LOG_ERROR(Service_Fatal, "called"); IPC::RequestParser rp(ctx); const auto error_code = rp.Pop<Result>(); @@ -147,7 +148,7 @@ void Module::Interface::ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx) { rb.Push(ResultSuccess); } -void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) { +void Module::Interface::ThrowFatalWithCpuContext(HLERequestContext& ctx) { LOG_ERROR(Service_Fatal, "called"); IPC::RequestParser rp(ctx); const auto error_code = rp.Pop<Result>(); @@ -163,10 +164,13 @@ void Module::Interface::ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx) rb.Push(ResultSuccess); } -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); auto module = std::make_shared<Module>(); - std::make_shared<Fatal_P>(module, system)->InstallAsService(service_manager); - std::make_shared<Fatal_U>(module, system)->InstallAsService(service_manager); + + server_manager->RegisterNamedService("fatal:p", std::make_shared<Fatal_P>(module, system)); + server_manager->RegisterNamedService("fatal:u", std::make_shared<Fatal_U>(module, system)); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::Fatal |