From 46b5e4513ad907f45bb636ba8b0a86f84ede6f10 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 3 Jun 2020 19:05:05 +0200 Subject: [PATCH] Win32: Fix VS /W4 compile warnings From upstream: https://github.com/glfw/glfw/commit/a84a30ab6399eedd4606da226fe4f02eab3c2d2e. --- glfw/egl_context.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/glfw/egl_context.c b/glfw/egl_context.c index d562a43af..39786760a 100644 --- a/glfw/egl_context.c +++ b/glfw/egl_context.c @@ -572,18 +572,16 @@ bool _glfwCreateContextEGL(_GLFWwindow* window, } // Set up attributes for surface creation + index = 0; + + if (fbconfig->sRGB) { - int index = 0; - - if (fbconfig->sRGB) - { - if (_glfw.egl.KHR_gl_colorspace) - setAttrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR); - } - - setAttrib(EGL_NONE, EGL_NONE); + if (_glfw.egl.KHR_gl_colorspace) + setAttrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR); } + setAttrib(EGL_NONE, EGL_NONE); + window->context.egl.surface = eglCreateWindowSurface(_glfw.egl.display, config,