7c197cc666ab8f170ed9691c13cf65fb48973b78 — Elias Naur 2 months ago 5605919
ui/app: support EGL versions >= 2.0

Versions with major > 1 don't exists, but let's handle the version
correctly in any case.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 2 insertions(+), 2 deletions(-)

M ui/app/egl.go
M ui/app/egl.go => ui/app/egl.go +2 -2
@@ 195,13 195,13 @@ if eglDisp == 0 {
  		return nil, fmt.Errorf("eglGetDisplay(_EGL_DEFAULT_DISPLAY) failed: 0x%x", eglGetError())
  	}
- 	_, minor, ret := eglInitialize(eglDisp)
+ 	major, minor, ret := eglInitialize(eglDisp)
  	if !ret {
  		return nil, fmt.Errorf("eglInitialize failed: 0x%x", eglGetError())
  	}
  	// sRGB framebuffer support on EGL 1.5 or if EGL_KHR_gl_colorspace is supported.
  	exts := strings.Split(eglQueryString(eglDisp, _EGL_EXTENSIONS), " ")
- 	srgb := minor >= 5 || hasExtension(exts, "EGL_KHR_gl_colorspace")
+ 	srgb := major > 1 || minor >= 5 || hasExtension(exts, "EGL_KHR_gl_colorspace")
  	attribs := []_EGLint{
  		_EGL_RENDERABLE_TYPE, _EGL_OPENGL_ES2_BIT,
  		_EGL_SURFACE_TYPE, _EGL_WINDOW_BIT,