diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-18 07:34:24 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-18 07:34:24 -0500 |
| commit | e531761d63b7f8fe6b6423fafb3616ebbff768aa (patch) | |
| tree | a4ca2537f1e887d8c81ff6820baccb039634d320 /hw/ssd0303.c | |
| parent | b1999e87b4d42305419329cae459e1b43f706d96 (diff) | |
| parent | 1562e53112fd1082c656a06d953a7447ab17e6e1 (diff) | |
| download | focaccia-qemu-e531761d63b7f8fe6b6423fafb3616ebbff768aa.tar.gz focaccia-qemu-e531761d63b7f8fe6b6423fafb3616ebbff768aa.zip | |
Merge remote-tracking branch 'kraxel/pixman.v8' into staging
# By Gerd Hoffmann (18) and others # Via Blue Swirl (1) and Gerd Hoffmann (1) * kraxel/pixman.v8: (37 commits) console: remove ds_get_* helper functions console: zap color_table console: stop using DisplayState in gfx hardware emulation console: zap displaystate from dcl callbacks cocoa: stop using DisplayState spice: stop using DisplayState sdl: stop using DisplayState vnc: stop using DisplayState gtk: stop using DisplayState console: add surface_*() getters console: rework DisplaySurface handling [dcl/ui side] console: rework DisplaySurface handling [vga emu side] sdl: drop dead code qxl: better vga init in enter_vga_mode qxl: zap qxl0 global spice: zap sdpy global console: kill DisplayState->opaque console: fix displaychangelisteners interface s390: Fix cpu refactoring fallout. target-mips: fix rndrashift_short_acc and code for EXTR_ instructions ...
Diffstat (limited to 'hw/ssd0303.c')
| -rw-r--r-- | hw/ssd0303.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/hw/ssd0303.c b/hw/ssd0303.c index db50909734..68d1f24b06 100644 --- a/hw/ssd0303.c +++ b/hw/ssd0303.c @@ -43,7 +43,7 @@ enum ssd0303_cmd { typedef struct { I2CSlave i2c; - DisplayState *ds; + QemuConsole *con; int row; int col; int start_line; @@ -191,6 +191,7 @@ static void ssd0303_event(I2CSlave *i2c, enum i2c_event event) static void ssd0303_update_display(void *opaque) { ssd0303_state *s = (ssd0303_state *)opaque; + DisplaySurface *surface = qemu_console_surface(s->con); uint8_t *dest; uint8_t *src; int x; @@ -204,7 +205,7 @@ static void ssd0303_update_display(void *opaque) if (!s->redraw) return; - switch (ds_get_bits_per_pixel(s->ds)) { + switch (surface_bits_per_pixel(surface)) { case 0: return; case 15: @@ -236,7 +237,7 @@ static void ssd0303_update_display(void *opaque) colors[0] = colortab + dest_width; colors[1] = colortab; } - dest = ds_get_data(s->ds); + dest = surface_data(surface); for (y = 0; y < 16; y++) { line = (y + s->start_line) & 63; src = s->framebuffer + 132 * (line >> 3) + 36; @@ -252,7 +253,7 @@ static void ssd0303_update_display(void *opaque) } } s->redraw = 0; - dpy_gfx_update(s->ds, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY); + dpy_gfx_update(s->con, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY); } static void ssd0303_invalidate_display(void * opaque) @@ -287,10 +288,10 @@ static int ssd0303_init(I2CSlave *i2c) { ssd0303_state *s = FROM_I2C_SLAVE(ssd0303_state, i2c); - s->ds = graphic_console_init(ssd0303_update_display, - ssd0303_invalidate_display, - NULL, NULL, s); - qemu_console_resize(s->ds, 96 * MAGNIFY, 16 * MAGNIFY); + s->con = graphic_console_init(ssd0303_update_display, + ssd0303_invalidate_display, + NULL, NULL, s); + qemu_console_resize(s->con, 96 * MAGNIFY, 16 * MAGNIFY); return 0; } |