From 97bef660181970bc53d03e9514037000c99b3680 Mon Sep 17 00:00:00 2001 From: Dan Elkouby Date: Sat, 23 Sep 2017 14:58:33 +0300 Subject: [PATCH] Fix RGB5_A1 conversion --- sysmodules/rosalina/source/draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysmodules/rosalina/source/draw.c b/sysmodules/rosalina/source/draw.c index c02e850..b8fc14d 100644 --- a/sysmodules/rosalina/source/draw.c +++ b/sysmodules/rosalina/source/draw.c @@ -233,9 +233,9 @@ static inline void Draw_ConvertPixelToBGR8(u8 *dst, const u8 *src, GSPGPU_Frameb case GSP_RGB5_A1_OES: { u16 px = *(u16 *)src; - blue = px & 0x1F; - green = (px >> 5) & 0x1F; - red = (px >> 10) & 0x1F; + blue = (px >> 1) & 0x1F; + green = (px >> 6) & 0x1F; + red = (px >> 11) & 0x1F; dst[0] = (blue << 3) | (blue >> 2); dst[1] = (green << 3) | (green >> 2);