From f5360a0d287923dcf8f1f25acdd8b772970175cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 30 Aug 2023 13:38:19 +0400 Subject: ui/vc: remove kbd_put_keysym() and update function calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function calls to `kbd_put_keysym` have been updated to now call `kbd_put_keysym_console` with a NULL console parameter. Like most console functions, NULL argument is now for the active console. This will allow to rename the text console functions in a consistent manner. Signed-off-by: Marc-André Lureau Reviewed-by: Akihiko Odaki --- ui/console.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ui/console.c') diff --git a/ui/console.c b/ui/console.c index e4d6179..4c07791 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1141,6 +1141,13 @@ void kbd_put_keysym_console(QemuTextConsole *s, int keysym) int c; uint32_t num_free; + if (!s) { + if (!QEMU_IS_TEXT_CONSOLE(active_console)) { + return; + } + s = QEMU_TEXT_CONSOLE(active_console); + } + switch(keysym) { case QEMU_KEY_CTRL_UP: console_scroll(s, -1); @@ -1231,13 +1238,6 @@ void kbd_put_string_console(QemuTextConsole *s, const char *str, int len) } } -void kbd_put_keysym(int keysym) -{ - if (QEMU_IS_TEXT_CONSOLE(active_console)) { - kbd_put_keysym_console(QEMU_TEXT_CONSOLE(active_console), keysym); - } -} - static void text_console_invalidate(void *opaque) { QemuTextConsole *s = QEMU_TEXT_CONSOLE(opaque); -- cgit v1.1