Merge pull request #687 from lioncash/instance

core: Don't construct instance of Core::System, just to access its live instance
This commit is contained in:
bunnei 2018-07-18 18:55:58 -07:00 committed by GitHub
commit 49b0966003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 22 deletions

View file

@ -26,11 +26,13 @@ namespace Core {
/*static*/ System System::s_instance;
System::System() = default;
System::~System() = default;
/// Runs a CPU core while the system is powered on
static void RunCpuCore(std::shared_ptr<Cpu> cpu_state) {
while (Core::System().GetInstance().IsPoweredOn()) {
while (Core::System::GetInstance().IsPoweredOn()) {
cpu_state->RunLoop(true);
}
}