summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index bc9e887b6..2b8ec3ca7 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -81,7 +81,7 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
81 return vfs->OpenFile(path, FileSys::Mode::Read); 81 return vfs->OpenFile(path, FileSys::Mode::Read);
82} 82}
83struct System::Impl { 83struct System::Impl {
84 explicit Impl(System& system) : kernel{system} {} 84 explicit Impl(System& system) : kernel{system}, cpu_core_manager{system} {}
85 85
86 Cpu& CurrentCpuCore() { 86 Cpu& CurrentCpuCore() {
87 return cpu_core_manager.GetCurrentCore(); 87 return cpu_core_manager.GetCurrentCore();
@@ -99,6 +99,7 @@ struct System::Impl {
99 LOG_DEBUG(HW_Memory, "initialized OK"); 99 LOG_DEBUG(HW_Memory, "initialized OK");
100 100
101 core_timing.Initialize(); 101 core_timing.Initialize();
102 cpu_core_manager.Initialize();
102 kernel.Initialize(); 103 kernel.Initialize();
103 104
104 const auto current_time = std::chrono::duration_cast<std::chrono::seconds>( 105 const auto current_time = std::chrono::duration_cast<std::chrono::seconds>(
@@ -142,8 +143,6 @@ struct System::Impl {
142 gpu_core = std::make_unique<VideoCommon::GPUSynch>(system, *renderer); 143 gpu_core = std::make_unique<VideoCommon::GPUSynch>(system, *renderer);
143 } 144 }
144 145
145 cpu_core_manager.Initialize(system);
146
147 LOG_DEBUG(Core, "Initialized OK"); 146 LOG_DEBUG(Core, "Initialized OK");
148 147
149 // Reset counters and set time origin to current frame 148 // Reset counters and set time origin to current frame
@@ -188,6 +187,10 @@ struct System::Impl {
188 static_cast<u32>(load_result)); 187 static_cast<u32>(load_result));
189 } 188 }
190 189
190 // Main process has been loaded and been made current.
191 // Begin CPU execution.
192 cpu_core_manager.StartThreads();
193
191 status = ResultStatus::Success; 194 status = ResultStatus::Success;
192 return status; 195 return status;
193 } 196 }