OpenGLDevice: Fix possible missing eglMakeCurrent() after FS

This commit is contained in:
Stenzek 2024-11-11 20:12:18 +10:00
parent 365e129792
commit 816ef45199
No known key found for this signature in database

View File

@ -292,8 +292,11 @@ void OpenGLContextEGL::DestroySurface(SurfaceHandle handle)
return;
EGLSurface surface = (EGLSurface)handle;
if (eglGetCurrentSurface(EGL_DRAW) == surface)
if (m_current_surface == surface)
{
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
m_current_surface = EGL_NO_SURFACE;
}
DestroyPlatformSurface(surface);
}