summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2022-10-15 00:48:28 -0700
committerGravatar bunnei2022-10-18 19:13:35 -0700
commit638fa6170a8a4c36ffa644055e683a7e50aa7ae5 (patch)
tree42d24dd017358235db295b512d3be2228b9b95d5 /src/core/core.cpp
parentcore: core_timing: Remove unused IsHostTiming. (diff)
downloadyuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.gz
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.xz
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.zip
core: core_timing: Re-initialize if single/multicore state changes.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 2c4c0dbe4..622a20510 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -155,6 +155,24 @@ struct System::Impl {
155 155
156 // Create default implementations of applets if one is not provided. 156 // Create default implementations of applets if one is not provided.
157 applet_manager.SetDefaultAppletsIfMissing(); 157 applet_manager.SetDefaultAppletsIfMissing();
158
159 is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue();
160
161 kernel.SetMulticore(is_multicore);
162 cpu_manager.SetMulticore(is_multicore);
163 cpu_manager.SetAsyncGpu(is_async_gpu);
164 }
165
166 void ReinitializeIfNecessary(System& system) {
167 if (is_multicore == Settings::values.use_multi_core.GetValue()) {
168 return;
169 }
170
171 LOG_DEBUG(Kernel, "Re-initializing");
172
173 is_multicore = Settings::values.use_multi_core.GetValue();
174
175 Initialize(system);
158 } 176 }
159 177
160 SystemResultStatus Run() { 178 SystemResultStatus Run() {
@@ -205,11 +223,8 @@ struct System::Impl {
205 SystemResultStatus SetupForMainProcess(System& system, Frontend::EmuWindow& emu_window) { 223 SystemResultStatus SetupForMainProcess(System& system, Frontend::EmuWindow& emu_window) {
206 LOG_DEBUG(Core, "initialized OK"); 224 LOG_DEBUG(Core, "initialized OK");
207 225
208 is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue(); 226 // Setting changes may require a full system reinitialization (e.g., disabling multicore).
209 227 ReinitializeIfNecessary(system);
210 kernel.SetMulticore(is_multicore);
211 cpu_manager.SetMulticore(is_multicore);
212 cpu_manager.SetAsyncGpu(is_async_gpu);
213 228
214 kernel.Initialize(); 229 kernel.Initialize();
215 cpu_manager.Initialize(); 230 cpu_manager.Initialize();