Henri Verbeet hverbeet@codeweavers.com writes:
case 16:
/* BGR, 5 red, 6 green, 5 blue */
*pixel_ptr = *xor_ptr * 0x1f;
*pixel_ptr |= (*xor_ptr & 0xe0) << 3;
/* [gggbbbbb][rrrrrggg] -> [xxxxxxxx][rrrrr000][gggggg00][bbbbb000] */
It seems to me that zero-padding isn't quite right, you should expand the values linearly.