From ab1b1edfd08352da95e84118b1c91bf612117f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 26 Aug 2022 19:08:18 +0200 Subject: [PATCH] EGL: Cleanup Both config parameters are "desired", but one is older and never had its name updated. This commit at least makes it clearer that they are similar. --- src/egl_context.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/egl_context.c b/src/egl_context.c index acf217b2..64dcdd6f 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -88,7 +88,7 @@ static int getEGLConfigAttrib(EGLConfig config, int attrib) // Return the EGLConfig most closely matching the specified hints // static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* desired, + const _GLFWfbconfig* fbconfig, EGLConfig* result) { EGLConfig* nativeConfigs; @@ -107,7 +107,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, else apiBit = EGL_OPENGL_BIT; - if (desired->stereo) + if (fbconfig->stereo) { _glfwInputError(GLFW_FORMAT_UNAVAILABLE, "EGL: Stereo rendering not supported"); return GLFW_FALSE; @@ -149,7 +149,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, if (!vi.visualid) continue; - if (desired->transparent) + if (fbconfig->transparent) { int count; XVisualInfo* vis = @@ -186,20 +186,20 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, // with an alpha channel to ensure the buffer is opaque if (!_glfw.egl.EXT_present_opaque) { - if (!desired->transparent && u->alphaBits > 0) + if (!fbconfig->transparent && u->alphaBits > 0) continue; } } #endif // _GLFW_WAYLAND u->samples = getEGLConfigAttrib(n, EGL_SAMPLES); - u->doublebuffer = desired->doublebuffer; + u->doublebuffer = fbconfig->doublebuffer; u->handle = (uintptr_t) n; usableCount++; } - closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount); + closest = _glfwChooseFBConfig(fbconfig, usableConfigs, usableCount); if (closest) *result = (EGLConfig) closest->handle; else