Android: Use DialogFragment for AlertMessage

This commit is contained in:
Ryan Meredith
2020-09-25 11:50:04 -04:00
parent 57f14b260b
commit 991eb6ae83
7 changed files with 142 additions and 63 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.