Add Core::State::Starting

This commit is contained in:
Michael M 2017-07-01 14:08:58 -07:00
parent d217e797f2
commit 22a9a08b24
4 changed files with 7 additions and 3 deletions

View File

@ -700,6 +700,9 @@ State GetState()
return State::Running;
}
if (s_is_booting.IsSet())
return State::Starting;
return State::Uninitialized;
}

View File

@ -31,7 +31,8 @@ enum class State
Uninitialized,
Paused,
Running,
Stopping
Stopping,
Starting,
};
bool Init(std::unique_ptr<BootParameters> boot);

View File

@ -179,7 +179,7 @@ void Init()
if (s_handle != nullptr)
return;
if (Core::GetState() != Core::State::Uninitialized)
if (Core::GetState() != Core::State::Uninitialized && Core::GetState() != Core::State::Starting)
{
if ((CoreTiming::GetTicks() - s_last_init) < SystemTimers::GetTicksPerSecond())
return;

View File

@ -195,7 +195,7 @@ void Init()
if (s_fd)
return;
if (Core::GetState() != Core::State::Uninitialized)
if (Core::GetState() != Core::State::Uninitialized && Core::GetState() != Core::State::Starting)
{
if ((CoreTiming::GetTicks() - s_last_init) < SystemTimers::GetTicksPerSecond())
return;