mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Wait for graphics thread's current execution to end before triggering the assert dialog
This commit is contained in:
parent
144bb1dd7f
commit
ad40156a3b
|
@ -777,7 +777,9 @@ void CGraphicsBackend_SDL_GL::ClampDriverVersion(EBackendType BackendType)
|
||||||
bool CGraphicsBackend_SDL_GL::ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg)
|
bool CGraphicsBackend_SDL_GL::ShowMessageBox(unsigned Type, const char *pTitle, const char *pMsg)
|
||||||
{
|
{
|
||||||
if(m_pProcessor != nullptr)
|
if(m_pProcessor != nullptr)
|
||||||
|
{
|
||||||
m_pProcessor->ErroneousCleanup();
|
m_pProcessor->ErroneousCleanup();
|
||||||
|
}
|
||||||
// TODO: Remove this workaround when https://github.com/libsdl-org/SDL/issues/3750 is
|
// 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
|
// fixed and pass the window to SDL_ShowSimpleMessageBox to make the popup modal instead
|
||||||
// of destroying the window before opening the popup.
|
// of destroying the window before opening the popup.
|
||||||
|
|
|
@ -3283,6 +3283,7 @@ bool CGraphics_Threaded::ShowMessageBox(unsigned Type, const char *pTitle, const
|
||||||
{
|
{
|
||||||
if(m_pBackend == nullptr)
|
if(m_pBackend == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
m_pBackend->WaitForIdle();
|
||||||
return m_pBackend->ShowMessageBox(Type, pTitle, pMsg);
|
return m_pBackend->ShowMessageBox(Type, pTitle, pMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue