diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-03-13 14:04:18 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-04-16 09:03:49 +0200 |
commit | 380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 (patch) | |
tree | e8097697817029ca6d545b8f68ba9761fb0f8164 /hw/display/tc6393xb.c | |
parent | 27be55872dd747c733a42a3d90864d9f59272d26 (diff) |
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,
instead of a bunch of function pointers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/tc6393xb.c')
-rw-r--r-- | hw/display/tc6393xb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index 01beba4751..b5b255c31a 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -548,6 +548,10 @@ static void tc6393xb_writeb(void *opaque, hwaddr addr, (uint32_t) addr, (int)value & 0xff); } +static const GraphicHwOps tc6393xb_gfx_ops = { + .gfx_update = tc6393xb_update_display, +}; + TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint32_t base, qemu_irq irq) { TC6393xbState *s; @@ -583,10 +587,7 @@ TC6393xbState *tc6393xb_init(MemoryRegion *sysmem, uint32_t base, qemu_irq irq) memory_region_add_subregion(sysmem, base + 0x100000, &s->vram); s->scr_width = 480; s->scr_height = 640; - s->con = graphic_console_init(tc6393xb_update_display, - NULL, /* invalidate */ - NULL, /* text_update */ - s); + s->con = graphic_console_init(&tc6393xb_gfx_ops, s); return s; } |