summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp14
-rw-r--r--src/core/hle/service/time/time.cpp7
-rw-r--r--src/core/hle/service/time/time.h1
-rw-r--r--src/core/hle/service/time/time_u.cpp1
4 files changed, 18 insertions, 5 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 8c5dd3761..4fb035556 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -139,6 +139,8 @@ void System::Reschedule() {
System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
LOG_DEBUG(HW_Memory, "initialized OK");
+ CoreTiming::Init();
+
switch (Settings::values.cpu_core) {
case Settings::CpuCore::Unicorn:
cpu_core = std::make_shared<ARM_Unicorn>();
@@ -154,14 +156,13 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
break;
}
- scheduler = std::make_unique<Kernel::Scheduler>(cpu_core.get());
gpu_core = std::make_unique<Tegra::GPU>();
telemetry_session = std::make_unique<Core::TelemetrySession>();
- CoreTiming::Init();
HW::Init();
Kernel::Init(system_mode);
+ scheduler = std::make_unique<Kernel::Scheduler>(cpu_core.get());
Service::Init();
GDBStub::Init();
@@ -189,15 +190,18 @@ void System::Shutdown() {
perf_results.frametime * 1000.0);
// Shutdown emulation session
- GDBStub::Shutdown();
VideoCore::Shutdown();
+ GDBStub::Shutdown();
Service::Shutdown();
+ scheduler = nullptr;
Kernel::Shutdown();
HW::Shutdown();
- CoreTiming::Shutdown();
+ telemetry_session = nullptr;
+ gpu_core = nullptr;
cpu_core = nullptr;
+ CoreTiming::Shutdown();
+
app_loader = nullptr;
- telemetry_session = nullptr;
LOG_DEBUG(Core, "Shutdown OK");
}
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp
index 364ddcea2..ad49f4265 100644
--- a/src/core/hle/service/time/time.cpp
+++ b/src/core/hle/service/time/time.cpp
@@ -146,6 +146,13 @@ void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Time, "called");
}
+void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<ISystemClock>();
+ LOG_DEBUG(Service_Time, "called");
+}
+
Module::Interface::Interface(std::shared_ptr<Module> time, const char* name)
: ServiceFramework(name), time(std::move(time)) {}
diff --git a/src/core/hle/service/time/time.h b/src/core/hle/service/time/time.h
index 1cbbadb21..197029e7a 100644
--- a/src/core/hle/service/time/time.h
+++ b/src/core/hle/service/time/time.h
@@ -56,6 +56,7 @@ public:
void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx);
void GetStandardSteadyClock(Kernel::HLERequestContext& ctx);
void GetTimeZoneService(Kernel::HLERequestContext& ctx);
+ void GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx);
protected:
std::shared_ptr<Module> time;
diff --git a/src/core/hle/service/time/time_u.cpp b/src/core/hle/service/time/time_u.cpp
index ae4f78adf..fc1ace325 100644
--- a/src/core/hle/service/time/time_u.cpp
+++ b/src/core/hle/service/time/time_u.cpp
@@ -13,6 +13,7 @@ TIME_U::TIME_U(std::shared_ptr<Module> time) : Module::Interface(std::move(time)
{1, &TIME_U::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
{2, &TIME_U::GetStandardSteadyClock, "GetStandardSteadyClock"},
{3, &TIME_U::GetTimeZoneService, "GetTimeZoneService"},
+ {4, &TIME_U::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
};
RegisterHandlers(functions);
}