From 8e329e51b7ce8de296200ba9f16bf298c09fc7db Mon Sep 17 00:00:00 2001 From: Maximilian Seidler Date: Fri, 17 Apr 2026 11:06:22 +0200 Subject: [PATCH] lockSurface: discard frameCallback when eglSwapBuffers fails --- src/core/LockSurface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/LockSurface.cpp b/src/core/LockSurface.cpp index 9df9d18..e099000 100644 --- a/src/core/LockSurface.cpp +++ b/src/core/LockSurface.cpp @@ -152,7 +152,11 @@ void CSessionLockSurface::render() { onCallback(); }); - eglSwapBuffers(g_pEGL->eglDisplay, eglSurface); + if (eglSwapBuffers(g_pEGL->eglDisplay, eglSurface) != EGL_TRUE) { + frameCallback.reset(); + needsFrame = true; + return; + } needsFrame = FEEDBACK.needsFrame || g_pAnimationManager->shouldTickForNext(); }