[0.4.13][OPENGL32] Fix Red and Green Color Swap (#3478) CORE-16221

Fixes CORE-16221 "Shock-4Way3D (Virtual Desktops) - wrong background color"

It regressed by 0.4.12-dev-389-g 5f2bebf7a5

Fix picked from commit 0.4.15-dev-2085-g 834394abd9
This commit is contained in:
Joachim Henze 2022-01-23 03:23:43 +01:00
parent 1e875d617e
commit 3e581f1c05

View file

@ -1280,7 +1280,7 @@ static void read_color_span_##__bpp(GLcontext* ctx,
{ \
Buffer -= __pixel_size; \
UNPACK_COLOR_##__bpp(GET_PIXEL_##__bpp((__type*)Buffer), \
&blue[n], &green[n], &red[n]); \
&red[n], &green[n], &blue[n]); \
alpha[n] = 0; \
} \
}
@ -1333,7 +1333,7 @@ static void read_color_pixels_##__bpp(GLcontext* ctx,
BYTE *Buffer = fb->BackBuffer + y[n] * WIDTH_BYTES_ALIGN32(fb->width, __bpp) \
+ x[n] * __pixel_size; \
UNPACK_COLOR_##__bpp(GET_PIXEL_##__bpp((__type*)Buffer), \
&blue[n], &green[n], &red[n]); \
&red[n], &green[n], &blue[n]); \
alpha[n] = 0; \
} \
} \