Revision 380cd056 hw/display/tcx.c
b/hw/display/tcx.c | ||
---|---|---|
510 | 510 |
}, |
511 | 511 |
}; |
512 | 512 |
|
513 |
static const GraphicHwOps tcx_ops = { |
|
514 |
.invalidate = tcx_invalidate_display, |
|
515 |
.gfx_update = tcx_update_display, |
|
516 |
}; |
|
517 |
|
|
518 |
static const GraphicHwOps tcx24_ops = { |
|
519 |
.invalidate = tcx24_invalidate_display, |
|
520 |
.gfx_update = tcx24_update_display, |
|
521 |
}; |
|
522 |
|
|
513 | 523 |
static int tcx_init1(SysBusDevice *dev) |
514 | 524 |
{ |
515 | 525 |
TCXState *s = FROM_SYSBUS(TCXState, dev); |
... | ... | |
562 | 572 |
&s->vram_mem, vram_offset, size); |
563 | 573 |
sysbus_init_mmio(dev, &s->vram_cplane); |
564 | 574 |
|
565 |
s->con = graphic_console_init(tcx24_update_display, |
|
566 |
tcx24_invalidate_display, |
|
567 |
NULL, s); |
|
575 |
s->con = graphic_console_init(&tcx24_ops, s); |
|
568 | 576 |
} else { |
569 | 577 |
/* THC 8 bit (dummy) */ |
570 | 578 |
memory_region_init_io(&s->thc8, &dummy_ops, s, "tcx.thc8", |
571 | 579 |
TCX_THC_NREGS_8); |
572 | 580 |
sysbus_init_mmio(dev, &s->thc8); |
573 | 581 |
|
574 |
s->con = graphic_console_init(tcx_update_display, |
|
575 |
tcx_invalidate_display, |
|
576 |
NULL, s); |
|
582 |
s->con = graphic_console_init(&tcx_ops, s); |
|
577 | 583 |
} |
578 | 584 |
|
579 | 585 |
qemu_console_resize(s->con, s->width, s->height); |
Also available in: Unified diff