mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
27be55872d
commit
380cd056ec
26 changed files with 155 additions and 104 deletions
|
@ -1383,6 +1383,10 @@ static void sm501_update_display(void *opaque)
|
|||
sm501_draw_crt(s);
|
||||
}
|
||||
|
||||
static const GraphicHwOps sm501_ops = {
|
||||
.gfx_update = sm501_update_display,
|
||||
};
|
||||
|
||||
void sm501_init(MemoryRegion *address_space_mem, uint32_t base,
|
||||
uint32_t local_mem_bytes, qemu_irq irq, CharDriverState *chr)
|
||||
{
|
||||
|
@ -1445,6 +1449,5 @@ void sm501_init(MemoryRegion *address_space_mem, uint32_t base,
|
|||
}
|
||||
|
||||
/* create qemu graphic console */
|
||||
s->con = graphic_console_init(sm501_update_display, NULL,
|
||||
NULL, s);
|
||||
s->con = graphic_console_init(&sm501_ops, s);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue