GL/ContextEGL: Fix red_size to blue_size (#3238)

This commit is contained in:
Nikolai Chizhov 2024-06-30 23:28:05 +09:00 committed by GitHub
parent 422102989c
commit 037519936a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}