From 559024593086d04e24a99a9f77490a3f97cf952d Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 1 May 2018 22:21:38 -0400 Subject: core: Move common CPU core things to its own class. --- src/core/core.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/core/core.h') diff --git a/src/core/core.h b/src/core/core.h index f81cbfb3c..6e6cc7579 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -4,9 +4,11 @@ #pragma once +#include #include #include #include "common/common_types.h" +#include "core/core_cpu.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/scheduler.h" #include "core/loader/loader.h" @@ -89,7 +91,7 @@ public: * @returns True if the emulated system is powered on, otherwise false. */ bool IsPoweredOn() const { - return cpu_core != nullptr; + return cpu_cores[0] != nullptr; } /** @@ -110,7 +112,7 @@ public: * @returns A reference to the emulated CPU. */ ARM_Interface& CPU() { - return *cpu_core; + return cpu_cores[0]->CPU(); } Tegra::GPU& GPU() { @@ -118,7 +120,7 @@ public: } Kernel::Scheduler& Scheduler() { - return *scheduler; + return cpu_cores[0]->Scheduler(); } Kernel::SharedPtr& CurrentProcess() { @@ -163,18 +165,12 @@ private: */ ResultStatus Init(EmuWindow* emu_window, u32 system_mode); - /// Reschedule the core emulation - void Reschedule(); - /// AppLoader used to load the current executing application std::unique_ptr app_loader; - std::shared_ptr cpu_core; - std::unique_ptr scheduler; + std::array, 4> cpu_cores; std::unique_ptr gpu_core; - std::shared_ptr debug_context; - Kernel::SharedPtr current_process; /// When true, signals that a reschedule should happen -- cgit v1.2.3