diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 9824769cf..29222baba 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include "core/loader/loader.h" | 18 | #include "core/loader/loader.h" |
| 19 | #include "core/settings.h" | 19 | #include "core/settings.h" |
| 20 | #include "file_sys/vfs_real.h" | 20 | #include "file_sys/vfs_real.h" |
| 21 | #include "video_core/renderer_base.h" | ||
| 21 | #include "video_core/video_core.h" | 22 | #include "video_core/video_core.h" |
| 22 | 23 | ||
| 23 | namespace Core { | 24 | namespace Core { |
| @@ -174,7 +175,6 @@ System::ResultStatus System::Init(EmuWindow& emu_window) { | |||
| 174 | cpu_cores[index] = std::make_shared<Cpu>(cpu_exclusive_monitor, cpu_barrier, index); | 175 | cpu_cores[index] = std::make_shared<Cpu>(cpu_exclusive_monitor, cpu_barrier, index); |
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | gpu_core = std::make_unique<Tegra::GPU>(); | ||
| 178 | telemetry_session = std::make_unique<Core::TelemetrySession>(); | 178 | telemetry_session = std::make_unique<Core::TelemetrySession>(); |
| 179 | service_manager = std::make_shared<Service::SM::ServiceManager>(); | 179 | service_manager = std::make_shared<Service::SM::ServiceManager>(); |
| 180 | 180 | ||
| @@ -182,10 +182,13 @@ System::ResultStatus System::Init(EmuWindow& emu_window) { | |||
| 182 | Service::Init(service_manager); | 182 | Service::Init(service_manager); |
| 183 | GDBStub::Init(); | 183 | GDBStub::Init(); |
| 184 | 184 | ||
| 185 | if (!VideoCore::Init(emu_window)) { | 185 | renderer = VideoCore::CreateRenderer(emu_window); |
| 186 | if (!renderer->Init()) { | ||
| 186 | return ResultStatus::ErrorVideoCore; | 187 | return ResultStatus::ErrorVideoCore; |
| 187 | } | 188 | } |
| 188 | 189 | ||
| 190 | gpu_core = std::make_unique<Tegra::GPU>(*renderer->Rasterizer()); | ||
| 191 | |||
| 189 | // Create threads for CPU cores 1-3, and build thread_to_cpu map | 192 | // Create threads for CPU cores 1-3, and build thread_to_cpu map |
| 190 | // CPU core 0 is run on the main thread | 193 | // CPU core 0 is run on the main thread |
| 191 | thread_to_cpu[std::this_thread::get_id()] = cpu_cores[0]; | 194 | thread_to_cpu[std::this_thread::get_id()] = cpu_cores[0]; |
| @@ -217,7 +220,7 @@ void System::Shutdown() { | |||
| 217 | perf_results.frametime * 1000.0); | 220 | perf_results.frametime * 1000.0); |
| 218 | 221 | ||
| 219 | // Shutdown emulation session | 222 | // Shutdown emulation session |
| 220 | VideoCore::Shutdown(); | 223 | renderer.reset(); |
| 221 | GDBStub::Shutdown(); | 224 | GDBStub::Shutdown(); |
| 222 | Service::Shutdown(); | 225 | Service::Shutdown(); |
| 223 | Kernel::Shutdown(); | 226 | Kernel::Shutdown(); |