From bd4163b5bf0cffb879bd798e078ec3d50b40cfd9 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 25 Jun 2025 00:30:18 -0700 Subject: [PATCH] duh --- src/platforms/rcore_comma.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/platforms/rcore_comma.c b/src/platforms/rcore_comma.c index 7e618d6e4..3ef7b2ee9 100644 --- a/src/platforms/rcore_comma.c +++ b/src/platforms/rcore_comma.c @@ -289,14 +289,18 @@ static int init_egl () { return -1; } - // > 1 is not supported, and FLAG_VSYNC_HINT is always set for some reason -// EGLBoolean ok = eglSwapInterval(platform.egl.display, FLAG_VSYNC_HINT ? 1 : 0); - EGLBoolean ok = eglSwapInterval(platform.egl.display, 0); + // > 1 is not supported + EGLBoolean ok = eglSwapInterval(platform.egl.display, (CORE.Window.flags & FLAG_VSYNC_HINT) ? 1 : 0); if (ok == EGL_FALSE) { TRACELOG(LOG_WARNING, "COMMA: eglSwapInterval failed. Error code: %s", eglGetErrorString(eglGetError())); return -1; } + EGLint interval = 0; + eglQueryString(dpy, EGL_EXTENSIONS); // check for EGL_BUFFER_AGE_EXT etc. + eglQuerySurface(dpy, surface, EGL_SWAP_INTERVAL, &interval); + TRACELOG(LOG_INFO, "COMMA: swap-interval actually in use = %d", interval); + // enable depth testing. Not necessary if only doing 2D glEnable(GL_DEPTH_TEST);