Commit 44c84c0d8e1701b9a0d0e3688f31b3a79163a81a

Sylvain 2021-12-17T17:44:34

GLES2/Big-endian: donĀ“t swap datas for yuv textures (Thanks 0x1F9F1 !)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index ddd336e..175ef5e 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -1516,7 +1516,7 @@ GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoffset, GLint 
     }
 
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
-    {
+    if (format == GL_RGBA) {
         int i;
         Uint32 *src32 = (Uint32 *)src;
         blob2 = (Uint32 *)SDL_malloc(src_pitch * height);