Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ui/console: fold text_console_update_cursor_timer
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230830093843.3531473-40-marcandre.lureau@redhat.com>
  • Loading branch information
elmarco committed Sep 4, 2023
1 parent 0a1642e commit 3f9c213
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ui/console.c
Expand Up @@ -174,7 +174,6 @@ static QEMUTimer *cursor_timer;

static void dpy_refresh(DisplayState *s);
static DisplayState *get_alloc_displaystate(void);
static void text_console_update_cursor_timer(void);
static void text_console_update_cursor(void *opaque);
static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl);
static bool console_compatible_with(QemuConsole *con,
Expand Down Expand Up @@ -2497,12 +2496,6 @@ static void vc_chr_set_echo(Chardev *chr, bool echo)
drv->console->echo = echo;
}

static void text_console_update_cursor_timer(void)
{
timer_mod(cursor_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
+ CONSOLE_CURSOR_PERIOD / 2);
}

static void text_console_update_cursor(void *opaque)
{
QemuConsole *s;
Expand All @@ -2520,7 +2513,8 @@ static void text_console_update_cursor(void *opaque)
}

if (count) {
text_console_update_cursor_timer();
timer_mod(cursor_timer,
qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_PERIOD / 2);
}
}

Expand Down

0 comments on commit 3f9c213

Please sign in to comment.