diff options
Diffstat (limited to 'hw/syborg_fb.c')
-rw-r--r-- | hw/syborg_fb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hw/syborg_fb.c b/hw/syborg_fb.c index 7e37364540..ae3e0ebc64 100644 --- a/hw/syborg_fb.c +++ b/hw/syborg_fb.c @@ -217,15 +217,24 @@ static void syborg_fb_update_display(void *opaque) } if (s->rgb) { - bpp_offset = 18; + bpp_offset = 24; } else { bpp_offset = 0; } if (s->endian) { + bpp_offset += 8; + } + /* Our bpp constants mostly match the PL110/PL111 but + * not for the 16 bit case + */ + switch (s->bpp) { + case BPP_SRC_16: bpp_offset += 6; + break; + default: + bpp_offset += s->bpp; } - - fn = fntable[s->bpp + bpp_offset]; + fn = fntable[bpp_offset]; if (s->pitch) { src_width = s->pitch; |