159,6 → 159,17 |
return (*(int *)src) & 0xffffff; |
} |
|
static void bgr_byte0888(void *dst, int rgb) |
{ |
*((uint32_t *) dst) = BLUE(rgb, 8) << 16 | GREEN(rgb, 8) << 8 | RED(rgb, 8); |
} |
|
static int byte0888_bgr(void *src) |
{ |
int color = *(uint32_t *)(src); |
return ((color & 0xff) << 16) | (((color >> 8) & 0xff) << 8) | ((color >> 16) & 0xff); |
} |
|
static void rgb_byte888(void *dst, int rgb) |
{ |
uint8_t *scr = dst; |
509,6 → 520,11 |
screen.scr2rgb = byte0888_rgb; |
screen.pixelbytes = 4; |
break; |
case VISUAL_BGR_0_8_8_8: |
screen.rgb2scr = bgr_byte0888; |
screen.scr2rgb = byte0888_bgr; |
screen.pixelbytes = 4; |
break; |
default: |
return false; |
} |