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() {