From e4915fb7d2077584a11a15141bc81d28ed2b0125 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sun, 29 Oct 2023 13:50:55 +0000 Subject: Rework time service to fix time passing offline. --- src/core/hle/service/psc/psc.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/psc/psc.cpp') diff --git a/src/core/hle/service/psc/psc.cpp b/src/core/hle/service/psc/psc.cpp index cd0cc9287..44310756b 100644 --- a/src/core/hle/service/psc/psc.cpp +++ b/src/core/hle/service/psc/psc.cpp @@ -4,9 +4,13 @@ #include #include "common/logging/log.h" +#include "core/core.h" #include "core/hle/service/ipc_helpers.h" #include "core/hle/service/psc/psc.h" -#include "core/hle/service/server_manager.h" +#include "core/hle/service/psc/time/manager.h" +#include "core/hle/service/psc/time/power_state_service.h" +#include "core/hle/service/psc/time/service_manager.h" +#include "core/hle/service/psc/time/static.h" #include "core/hle/service/service.h" namespace Service::PSC { @@ -76,6 +80,17 @@ void LoopProcess(Core::System& system) { server_manager->RegisterNamedService("psc:c", std::make_shared(system)); server_manager->RegisterNamedService("psc:m", std::make_shared(system)); + + auto time = std::make_shared(system); + + server_manager->RegisterNamedService( + "time:m", std::make_shared(system, time, server_manager.get())); + server_manager->RegisterNamedService( + "time:su", std::make_shared( + system, Time::StaticServiceSetupInfo{0, 0, 0, 0, 0, 1}, time, "time:su")); + server_manager->RegisterNamedService("time:al", + std::make_shared(system, time)); + ServerManager::RunServer(std::move(server_manager)); } -- cgit v1.2.3