Merge pull request #8833 from Ebola16/Panic

Android: Use DialogFragment for AlertMessage
This commit is contained in:
JosJuice
2020-10-10 21:03:52 +02:00
committed by GitHub
9 changed files with 182 additions and 67 deletions

View File

@ -170,6 +170,11 @@ void DisplayMessage(std::string message, int time_in_ms)
OSD::AddMessage(std::move(message), time_in_ms);
}
bool IsBooting()
{
return s_is_booting.IsSet() || !s_hardware_initialized;
}
bool IsRunning()
{
return (GetState() != State::Uninitialized || s_hardware_initialized) && !s_is_stopping;
@ -674,7 +679,7 @@ State GetState()
void WaitUntilDoneBooting()
{
if (s_is_booting.IsSet() || !s_hardware_initialized)
if (IsBooting())
s_done_booting.Wait();
}

View File

@ -99,6 +99,7 @@ void UndeclareAsCPUThread();
std::string StopMessage(bool main_thread, std::string_view message);
bool IsBooting();
bool IsRunning();
bool IsRunningAndStarted(); // is running and the CPU loop has been entered
bool IsRunningInCurrentThread(); // this tells us whether we are running in the CPU thread.