console: untangle gfx & txt updates
Stop abusing displaysurface fields for text mode displays.
(bpp = 0, width = cols, height = lines).
Add flags to displaystate indicating whenever text mode display
(curses) or gfx mode displays (sdl, vnc, ...) are present.
Add separate displaychangelistener callbacks for text / gfx mode
resize & updates.
This allows to enable gfx and txt diplays at the same time and also
paves the way for more cleanups in the future.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index dc92790..34532e5 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -321,14 +321,14 @@
for (; line > 0; line --, src += bypl, dst += bypl)
memcpy(dst, src, width);
- dpy_update(s->vga.ds, x, y, w, h);
+ dpy_gfx_update(s->vga.ds, x, y, w, h);
}
static inline void vmsvga_update_screen(struct vmsvga_state_s *s)
{
memcpy(ds_get_data(s->vga.ds), s->vga.vram_ptr,
s->bypp * s->width * s->height);
- dpy_update(s->vga.ds, 0, 0, s->width, s->height);
+ dpy_gfx_update(s->vga.ds, 0, 0, s->width, s->height);
}
static inline void vmsvga_update_rect_delayed(struct vmsvga_state_s *s,