mirror of
https://github.com/qemu/qemu.git
synced 2024-12-14 23:13:29 +08:00
ui/console: update the head from unused QemuConsole
When recycling unused QemuConsole, we should still set the associated head number for correct information and lookups. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-25-marcandre.lureau@redhat.com>
This commit is contained in:
parent
f9411aaebd
commit
7fa4b8041b
@ -2193,10 +2193,10 @@ QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head,
|
|||||||
} else {
|
} else {
|
||||||
trace_console_gfx_new();
|
trace_console_gfx_new();
|
||||||
s = (QemuConsole *)object_new(TYPE_QEMU_GRAPHIC_CONSOLE);
|
s = (QemuConsole *)object_new(TYPE_QEMU_GRAPHIC_CONSOLE);
|
||||||
s->head = head;
|
|
||||||
s->ui_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
|
s->ui_timer = timer_new_ms(QEMU_CLOCK_REALTIME,
|
||||||
dpy_set_ui_info_timer, s);
|
dpy_set_ui_info_timer, s);
|
||||||
}
|
}
|
||||||
|
s->head = head;
|
||||||
graphic_console_set_hwops(s, hw_ops, opaque);
|
graphic_console_set_hwops(s, hw_ops, opaque);
|
||||||
if (dev) {
|
if (dev) {
|
||||||
object_property_set_link(OBJECT(s), "device", OBJECT(dev),
|
object_property_set_link(OBJECT(s), "device", OBJECT(dev),
|
||||||
|
Loading…
Reference in New Issue
Block a user