mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
spice: add qemu_spice_display_init_common
Factor out SimpleSpiceDisplay initialization into qemu_spice_display_init_common() and call it from both qxl.c (for vga mode) and spice-display.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
5c59d11816
commit
a963f876c8
3 changed files with 13 additions and 12 deletions
7
hw/qxl.c
7
hw/qxl.c
|
@ -1315,12 +1315,7 @@ static int qxl_init_primary(PCIDevice *dev)
|
|||
|
||||
vga->ds = graphic_console_init(qxl_hw_update, qxl_hw_invalidate,
|
||||
qxl_hw_screen_dump, qxl_hw_text_update, qxl);
|
||||
qxl->ssd.ds = vga->ds;
|
||||
qemu_mutex_init(&qxl->ssd.lock);
|
||||
qxl->ssd.mouse_x = -1;
|
||||
qxl->ssd.mouse_y = -1;
|
||||
qxl->ssd.bufsize = (16 * 1024 * 1024);
|
||||
qxl->ssd.buf = qemu_malloc(qxl->ssd.bufsize);
|
||||
qemu_spice_display_init_common(&qxl->ssd, vga->ds);
|
||||
|
||||
qxl0 = qxl;
|
||||
register_displaychangelistener(vga->ds, &display_listener);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue