From 037519936ad2b9c0ef1db659acf2e18bb1e8a41e Mon Sep 17 00:00:00 2001
From: Nikolai Chizhov <kolankrada@gmail.com>
Date: Sun, 30 Jun 2024 23:28:05 +0900
Subject: [PATCH] GL/ContextEGL: Fix red_size to blue_size (#3238)

---
 src/util/opengl_context_egl.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/opengl_context_egl.cpp b/src/util/opengl_context_egl.cpp
index 2049b7d4e..7fd6b219d 100644
--- a/src/util/opengl_context_egl.cpp
+++ b/src/util/opengl_context_egl.cpp
@@ -433,11 +433,11 @@ GPUTexture::Format OpenGLContextEGL::GetSurfaceTextureFormat() const
   eglGetConfigAttrib(m_display, m_config, EGL_BLUE_SIZE, &blue_size);
   eglGetConfigAttrib(m_display, m_config, EGL_ALPHA_SIZE, &alpha_size);
 
-  if (red_size == 5 && green_size == 6 && red_size == 5)
+  if (red_size == 5 && green_size == 6 && blue_size == 5)
   {
     return GPUTexture::Format::RGB565;
   }
-  else if (red_size == 5 && green_size == 5 && red_size == 5 && alpha_size == 1)
+  else if (red_size == 5 && green_size == 5 && blue_size == 5 && alpha_size == 1)
   {
     return GPUTexture::Format::RGBA5551;
   }