summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {
139System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { 139System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
140 LOG_DEBUG(HW_Memory, "initialized OK"); 140 LOG_DEBUG(HW_Memory, "initialized OK");
141 141
142 CoreTiming::Init();
143
142 switch (Settings::values.cpu_core) { 144 switch (Settings::values.cpu_core) {
143 case Settings::CpuCore::Unicorn: 145 case Settings::CpuCore::Unicorn:
144 cpu_core = std::make_shared<ARM_Unicorn>(); 146 cpu_core = std::make_shared<ARM_Unicorn>();
@@ -154,14 +156,13 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) {
154 break; 156 break;
155 } 157 }
156 158
157 scheduler = std::make_unique<Kernel::Scheduler>(cpu_core.get());
158 gpu_core = std::make_unique<Tegra::GPU>(); 159 gpu_core = std::make_unique<Tegra::GPU>();
159 160
160 telemetry_session = std::make_unique<Core::TelemetrySession>(); 161 telemetry_session = std::make_unique<Core::TelemetrySession>();
161 162
162 CoreTiming::Init();
163 HW::Init(); 163 HW::Init();
164 Kernel::Init(system_mode); 164 Kernel::Init(system_mode);
165 scheduler = std::make_unique<Kernel::Scheduler>(cpu_core.get());
165 Service::Init(); 166 Service::Init();
166 GDBStub::Init(); 167 GDBStub::Init();
167 168
@@ -189,15 +190,18 @@ void System::Shutdown() {
189 perf_results.frametime * 1000.0); 190 perf_results.frametime * 1000.0);
190 191
191 // Shutdown emulation session 192 // Shutdown emulation session
192 GDBStub::Shutdown();
193 VideoCore::Shutdown(); 193 VideoCore::Shutdown();
194 GDBStub::Shutdown();
194 Service::Shutdown(); 195 Service::Shutdown();
196 scheduler = nullptr;
195 Kernel::Shutdown(); 197 Kernel::Shutdown();
196 HW::Shutdown(); 198 HW::Shutdown();
197 CoreTiming::Shutdown(); 199 telemetry_session = nullptr;
200 gpu_core = nullptr;
198 cpu_core = nullptr; 201 cpu_core = nullptr;
202 CoreTiming::Shutdown();
203
199 app_loader = nullptr; 204 app_loader = nullptr;
200 telemetry_session = nullptr;
201 205
202 LOG_DEBUG(Core, "Shutdown OK"); 206 LOG_DEBUG(Core, "Shutdown OK");
203} 207}
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) {
146 LOG_DEBUG(Service_Time, "called"); 146 LOG_DEBUG(Service_Time, "called");
147} 147}
148 148
149void Module::Interface::GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx) {
150 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
151 rb.Push(RESULT_SUCCESS);
152 rb.PushIpcInterface<ISystemClock>();
153 LOG_DEBUG(Service_Time, "called");
154}
155
149Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) 156Module::Interface::Interface(std::shared_ptr<Module> time, const char* name)
150 : ServiceFramework(name), time(std::move(time)) {} 157 : ServiceFramework(name), time(std::move(time)) {}
151 158
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:
56 void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx); 56 void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx);
57 void GetStandardSteadyClock(Kernel::HLERequestContext& ctx); 57 void GetStandardSteadyClock(Kernel::HLERequestContext& ctx);
58 void GetTimeZoneService(Kernel::HLERequestContext& ctx); 58 void GetTimeZoneService(Kernel::HLERequestContext& ctx);
59 void GetStandardLocalSystemClock(Kernel::HLERequestContext& ctx);
59 60
60 protected: 61 protected:
61 std::shared_ptr<Module> time; 62 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)
13 {1, &TIME_U::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"}, 13 {1, &TIME_U::GetStandardNetworkSystemClock, "GetStandardNetworkSystemClock"},
14 {2, &TIME_U::GetStandardSteadyClock, "GetStandardSteadyClock"}, 14 {2, &TIME_U::GetStandardSteadyClock, "GetStandardSteadyClock"},
15 {3, &TIME_U::GetTimeZoneService, "GetTimeZoneService"}, 15 {3, &TIME_U::GetTimeZoneService, "GetTimeZoneService"},
16 {4, &TIME_U::GetStandardLocalSystemClock, "GetStandardLocalSystemClock"},
16 }; 17 };
17 RegisterHandlers(functions); 18 RegisterHandlers(functions);
18} 19}