From 7d6653268f68dea8bc39288e3a27bc499b7b8154 Mon Sep 17 00:00:00 2001 From: bunnei <bunneidev@gmail.com> Date: Tue, 13 Mar 2018 17:49:59 -0400 Subject: core: Move process creation out of global state. --- src/core/core.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index 4fb0355569..ac6cb9e6e9 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -100,7 +100,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file return init_result; } - const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)}; + const Loader::ResultStatus load_result{app_loader->Load(current_process)}; if (Loader::ResultStatus::Success != load_result) { LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", load_result); System::Shutdown(); @@ -141,6 +141,8 @@ System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { CoreTiming::Init(); + current_process = Kernel::Process::Create("main"); + switch (Settings::values.cpu_core) { case Settings::CpuCore::Unicorn: cpu_core = std::make_shared<ARM_Unicorn>(); -- cgit v1.2.3-70-g09d2