mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13: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
|
@ -475,13 +475,16 @@ static const VMStateDescription vmstate_g364fb = {
|
|||
}
|
||||
};
|
||||
|
||||
static const GraphicHwOps g364fb_ops = {
|
||||
.invalidate = g364fb_invalidate_display,
|
||||
.gfx_update = g364fb_update_display,
|
||||
};
|
||||
|
||||
static void g364fb_init(DeviceState *dev, G364State *s)
|
||||
{
|
||||
s->vram = g_malloc0(s->vram_size);
|
||||
|
||||
s->con = graphic_console_init(g364fb_update_display,
|
||||
g364fb_invalidate_display,
|
||||
NULL, s);
|
||||
s->con = graphic_console_init(&g364fb_ops, s);
|
||||
|
||||
memory_region_init_io(&s->mem_ctrl, &g364fb_ctrl_ops, s, "ctrl", 0x180000);
|
||||
memory_region_init_ram_ptr(&s->mem_vram, "vram",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue