aboutsummaryrefslogtreecommitdiff
path: root/hw/vga.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vga.c')
-rw-r--r--hw/vga.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/vga.c b/hw/vga.c
index 2a0a9c3d01..2660b04695 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -824,8 +824,7 @@ typedef void vga_draw_line_func(VGAState *s1, uint8_t *d,
static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b)
{
- /* XXX: TODO */
- return 0;
+ return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
}
static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b)