diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-24 19:29:13 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-24 19:29:13 +0000 |
commit | 0e1f5a0c495dd7a5c72c9321a29541bdde8f423a (patch) | |
tree | 374c5da7054c16f764a1cb2b5079d612cf417dac /hw/musicpal.c | |
parent | cab3bee2d6f1d6eb6ad74006b8a63562cda9ba4d (diff) |
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 <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r-- | hw/musicpal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c index c7c11dea4..313b1341c 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -801,7 +801,7 @@ static inline void glue(set_lcd_pixel, depth) \ (musicpal_lcd_state *s, int x, int y, type col) \ { \ int dx, dy; \ - type *pixel = &((type *) s->ds->data)[(y * 128 * 3 + x) * 3]; \ + type *pixel = &((type *) ds_get_data(s->ds))[(y * 128 * 3 + x) * 3]; \ \ for (dy = 0; dy < 3; dy++, pixel += 127 * 3) \ for (dx = 0; dx < 3; dx++, pixel++) \ @@ -818,7 +818,7 @@ static void lcd_refresh(void *opaque) musicpal_lcd_state *s = opaque; int x, y, col; - switch (s->ds->depth) { + switch (ds_get_bits_per_pixel(s->ds)) { case 0: return; #define LCD_REFRESH(depth, func) \ @@ -838,7 +838,7 @@ static void lcd_refresh(void *opaque) LCD_REFRESH(32, (s->ds->bgr ? rgb_to_pixel32bgr : rgb_to_pixel32)) default: cpu_abort(cpu_single_env, "unsupported colour depth %i\n", - s->ds->depth); + ds_get_bits_per_pixel(s->ds)); } dpy_update(s->ds, 0, 0, 128*3, 64*3); |