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:
commit
49b0966003
6 changed files with 26 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue