mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
ui/vc: move text console invalidate in helper
This will allow to split the VC code in a separate unit more easily. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-43-marcandre.lureau@redhat.com>
This commit is contained in:
parent
893fe23e7d
commit
322dae4bc8
2 changed files with 10 additions and 4 deletions
13
ui/console.c
13
ui/console.c
|
@ -2500,13 +2500,11 @@ static void vc_chr_set_echo(Chardev *chr, bool echo)
|
|||
drv->console->echo = echo;
|
||||
}
|
||||
|
||||
static void text_console_update_cursor(void *opaque)
|
||||
int qemu_invalidate_text_consoles(void)
|
||||
{
|
||||
QemuConsole *s;
|
||||
int count = 0;
|
||||
|
||||
cursor_visible_phase = !cursor_visible_phase;
|
||||
|
||||
QTAILQ_FOREACH(s, &consoles, next) {
|
||||
if (qemu_console_is_graphic(s) ||
|
||||
!qemu_console_is_visible(s)) {
|
||||
|
@ -2516,7 +2514,14 @@ static void text_console_update_cursor(void *opaque)
|
|||
graphic_hw_invalidate(s);
|
||||
}
|
||||
|
||||
if (count) {
|
||||
return count;
|
||||
}
|
||||
|
||||
static void text_console_update_cursor(void *opaque)
|
||||
{
|
||||
cursor_visible_phase = !cursor_visible_phase;
|
||||
|
||||
if (qemu_invalidate_text_consoles()) {
|
||||
timer_mod(cursor_timer,
|
||||
qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_PERIOD / 2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue