diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-13 17:49:59 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-14 18:42:19 -0400 |
commit | 7d6653268f68dea8bc39288e3a27bc499b7b8154 (patch) | |
tree | 6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/core/core.cpp | |
parent | 8538e0bc3db180627ca737989ef0e2b8da39a566 (diff) |
core: Move process creation out of global state.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r-- | src/core/core.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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>(); |