Lots of Android fixes and stubs. Increase SDL log level on Android. Add GL context loss handling.

This commit is contained in:
elasota
2020-10-20 23:43:02 -04:00
parent f26f631ae2
commit 23b69cf0ee
32 changed files with 609 additions and 173 deletions

View File

@@ -28,7 +28,7 @@ void DrawSurface::PushToDDSurface(IGpDisplayDriver *displayDriver)
}
if (m_ddSurface == nullptr)
m_ddSurface = displayDriver->CreateSurface(pixMap->m_rect.right - pixMap->m_rect.left, pixMap->m_rect.bottom - pixMap->m_rect.top, pixMap->m_pitch, pixMap->m_pixelFormat);
m_ddSurface = displayDriver->CreateSurface(pixMap->m_rect.right - pixMap->m_rect.left, pixMap->m_rect.bottom - pixMap->m_rect.top, pixMap->m_pitch, pixMap->m_pixelFormat, DrawSurface::StaticOnDriverInvalidate, this);
if (m_port.IsDirty(PortabilityLayer::QDPortDirtyFlag_Contents) && m_ddSurface != nullptr)
{
@@ -36,3 +36,13 @@ void DrawSurface::PushToDDSurface(IGpDisplayDriver *displayDriver)
m_port.ClearDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
}
}
void DrawSurface::StaticOnDriverInvalidate(void *context)
{
static_cast<DrawSurface*>(context)->OnDriverInvalidate();
}
void DrawSurface::OnDriverInvalidate()
{
m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
}