1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-08-29 23:46:31 -05:00

core: Move process creation out of global state.

This commit is contained in:
bunnei
2018-03-13 17:49:59 -04:00
parent 8538e0bc3d
commit 7d6653268f
22 changed files with 87 additions and 72 deletions

View File

@@ -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>();