From 72b1f50314a325e1734c608adbe00ab79b805b72 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 10 Jun 2026 15:27:08 +0800 Subject: [PATCH] [Fix] (MG_Backend/DirectGLES): don't glFlush on present --- MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp index 541dd4fb..dbc422a7 100644 --- a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp +++ b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp @@ -2317,11 +2317,8 @@ namespace MobileGL::MG_Backend::DirectGLES { } static Bool PresentStatsEnabled() { - static const Bool enabled = [] { - const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS"); - return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0; - }(); - return enabled; + const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS"); + return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0; } static void DumpDefaultFramebufferStats() { @@ -2581,13 +2578,7 @@ namespace MobileGL::MG_Backend::DirectGLES { } void Present() { - if (g_Display != EGL_NO_DISPLAY && g_Surface != EGL_NO_SURFACE) { - DumpDefaultFramebufferStats(); - if (g_GLESFuncs.glFlush) { - g_GLESFuncs.glFlush(); - } g_EGLFuncs.eglSwapBuffers(g_Display, g_Surface); - } } void DestroyEGLContext() {