From 0e1f5a0c495dd7a5c72c9321a29541bdde8f423a Mon Sep 17 00:00:00 2001 From: aliguori Date: Mon, 24 Nov 2008 19:29:13 +0000 Subject: Introduce accessors for DisplayState (Stefano Stabellini) Introducing some accessors: ds_get_linesize ds_get_bits_per_pixel ds_get_width ds_get_height ds_get_data Signed-off-by: Stefano Stabellini Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/cirrus_vga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/cirrus_vga.c') diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index af9c9e6..832a636 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -2321,9 +2321,9 @@ static void cirrus_cursor_draw_line(VGAState *s1, uint8_t *d1, int scr_y) color1 = s->rgb_to_pixel(c6_to_8(palette[0xf * 3]), c6_to_8(palette[0xf * 3 + 1]), c6_to_8(palette[0xf * 3 + 2])); - bpp = ((s->ds->depth + 7) >> 3); + bpp = ((ds_get_bits_per_pixel(s->ds) + 7) >> 3); d1 += x1 * bpp; - switch(s->ds->depth) { + switch(ds_get_bits_per_pixel(s->ds)) { default: break; case 8: -- cgit v1.1