GBA Video: Fix modes 3 and 5 with RGB565 pixel format
Jeffrey Pfau jeffrey@endrift.com
Mon, 16 Mar 2015 20:32:02 -0700
1 files changed,
12 insertions(+),
0 deletions(-)
M
src/gba/renderers/video-software.c
→
src/gba/renderers/video-software.c
@@ -1526,6 +1526,12 @@ color32 |= (color << 3) & 0xF8;
color32 |= (color << 6) & 0xF800; color32 |= (color << 9) & 0xF80000; color = color32; +#elif COLOR_5_6_5 + uint16_t color16 = 0; + color16 |= (color & 0x001F) << 11; + color16 |= (color & 0x03E0) << 1; + color16 |= (color & 0x7C00) >> 10; + color = color16; #endif mosaicWait = mosaicH; } else {@@ -1609,6 +1615,12 @@ color32 |= (color << 9) & 0xF80000;
color32 |= (color << 3) & 0xF8; color32 |= (color << 6) & 0xF800; color = color32; +#elif COLOR_5_6_5 + uint16_t color16 = 0; + color16 |= (color & 0x001F) << 11; + color16 |= (color & 0x03E0) << 1; + color16 |= (color & 0x7C00) >> 10; + color = color16; #endif mosaicWait = mosaicH; } else {