diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core.cpp | 14 |
1 files changed, 9 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() { | |||
| 139 | System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { | 139 | System::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 | } |