mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33: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
|
@ -991,6 +991,11 @@ static const VMStateDescription vmstate_pxa2xx_lcdc = {
|
|||
#define BITS 32
|
||||
#include "pxa2xx_template.h"
|
||||
|
||||
static const GraphicHwOps pxa2xx_ops = {
|
||||
.invalidate = pxa2xx_invalidate_display,
|
||||
.gfx_update = pxa2xx_update_display,
|
||||
};
|
||||
|
||||
PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
|
||||
hwaddr base, qemu_irq irq)
|
||||
{
|
||||
|
@ -1008,9 +1013,7 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
|
|||
"pxa2xx-lcd-controller", 0x00100000);
|
||||
memory_region_add_subregion(sysmem, base, &s->iomem);
|
||||
|
||||
s->con = graphic_console_init(pxa2xx_update_display,
|
||||
pxa2xx_invalidate_display,
|
||||
NULL, s);
|
||||
s->con = graphic_console_init(&pxa2xx_ops, s);
|
||||
surface = qemu_console_surface(s->con);
|
||||
|
||||
switch (surface_bits_per_pixel(surface)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue