Wait for graphics thread's current execution to end before triggering the assert dialog

This commit is contained in:
Jupeyy 2023-05-27 09:23:59 +02:00
parent 144bb1dd7f
commit ad40156a3b
2 changed files with 3 additions and 0 deletions

View file

@ -777,7 +777,9 @@ void CGraphicsBackend_SDL_GL::ClampDriverVersion(EBackendType BackendType)
bool CGraphicsBackend_SDL_GL::ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg)
{
if(m_pProcessor != nullptr)
{
m_pProcessor->ErroneousCleanup();
}
// TODO: Remove this workaround when https://github.com/libsdl-org/SDL/issues/3750 is
// fixed and pass the window to SDL_ShowSimpleMessageBox to make the popup modal instead
// of destroying the window before opening the popup.

View file

@ -3283,6 +3283,7 @@ bool CGraphics_Threaded::ShowMessageBox(unsigned Type, const char *pTitle, const
{
if(m_pBackend == nullptr)
return false;
m_pBackend->WaitForIdle();
return m_pBackend->ShowMessageBox(Type, pTitle, pMsg);
}