summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-05-30 19:37:18 -0400
committerGravatar Zach Hilman2019-09-21 21:45:05 -0400
commit3e729c13cc70af6fb8fef6e38bd5deba7a8a0d6e (patch)
treeaff7d6e612b689ac429310099e59c485ac8a007b /src/core/core.cpp
parentcore: Update RegisterCheatList for new VM (diff)
downloadyuzu-3e729c13cc70af6fb8fef6e38bd5deba7a8a0d6e.tar.gz
yuzu-3e729c13cc70af6fb8fef6e38bd5deba7a8a0d6e.tar.xz
yuzu-3e729c13cc70af6fb8fef6e38bd5deba7a8a0d6e.zip
core: Initialize cheats after load to avoid VMManager crash
This used to occur due to the VMManager being nullptr at the time cheats were registered (during load, but before it was done). This is bypassed by not accessing the VMManager for offset data until load is complete,
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 67ec8d4b9..fc7039421 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -205,6 +205,11 @@ struct System::Impl {
205 gpu_core->Start(); 205 gpu_core->Start();
206 cpu_core_manager.StartThreads(); 206 cpu_core_manager.StartThreads();
207 207
208 // Initialize cheat engine
209 if (cheat_engine) {
210 cheat_engine->Initialize();
211 }
212
208 // All threads are started, begin main process execution, now that we're in the clear. 213 // All threads are started, begin main process execution, now that we're in the clear.
209 main_process->Run(load_parameters->main_thread_priority, 214 main_process->Run(load_parameters->main_thread_priority,
210 load_parameters->main_thread_stack_size); 215 load_parameters->main_thread_stack_size);