sm501: Fix hardware cursor color conversion
commita69232e2a36b9fcee46ddbf140ab2de1583abf39
authorSebastian Bauer <mail@sebastianbauer.info>
Mon, 18 Jun 2018 21:38:16 +0000 (18 23:38 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Jun 2018 11:22:53 +0000 (21 21:22 +1000)
treee6fd716c20eae1e6b77ce6ff4989c2ab443fd4b8
parent88d8d5555d0257a31b5891a328d957cc9b579eb2
sm501: Fix hardware cursor color conversion

According to the sm501 specs the hardware cursor colors are to be given in
the rgb565 format, but the code currently interprets them as bgr565.

Therefore, the colors of the hardware cursors are wrong in the QEMU
display, e.g., the standard mouse pointer of AmigaOS appears blue instead
of red. This change fixes this issue by replacing the existing naive
bgr565 => rgb888 conversion with a standard rgb565 => rgb888 one that also
scales the color component values properly.

Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/display/sm501.c