summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-15 09:48:28 +0200
committerbunnei <bunneidev@gmail.com>2022-10-19 04:13:35 +0200
commit638fa6170a8a4c36ffa644055e683a7e50aa7ae5 (patch)
tree42d24dd017358235db295b512d3be2228b9b95d5 /src/core/core.cpp
parentcore: core_timing: Remove unused IsHostTiming. (diff)
downloadyuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.gz
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.bz2
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.lz
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.xz
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.tar.zst
yuzu-638fa6170a8a4c36ffa644055e683a7e50aa7ae5.zip
Diffstat (limited to '')
-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 {
// Create default implementations of applets if one is not provided.
applet_manager.SetDefaultAppletsIfMissing();
+
+ is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue();
+
+ kernel.SetMulticore(is_multicore);
+ cpu_manager.SetMulticore(is_multicore);
+ cpu_manager.SetAsyncGpu(is_async_gpu);
+ }
+
+ void ReinitializeIfNecessary(System& system) {
+ if (is_multicore == Settings::values.use_multi_core.GetValue()) {
+ return;
+ }
+
+ LOG_DEBUG(Kernel, "Re-initializing");
+
+ is_multicore = Settings::values.use_multi_core.GetValue();
+
+ Initialize(system);
}
SystemResultStatus Run() {
@@ -205,11 +223,8 @@ struct System::Impl {
SystemResultStatus SetupForMainProcess(System& system, Frontend::EmuWindow& emu_window) {
LOG_DEBUG(Core, "initialized OK");
- is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue();
-
- kernel.SetMulticore(is_multicore);
- cpu_manager.SetMulticore(is_multicore);
- cpu_manager.SetAsyncGpu(is_async_gpu);
+ // Setting changes may require a full system reinitialization (e.g., disabling multicore).
+ ReinitializeIfNecessary(system);
kernel.Initialize();
cpu_manager.Initialize();