diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-08-30 13:38:19 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 10:37:02 +0400 |
commit | f5360a0d287923dcf8f1f25acdd8b772970175cb (patch) | |
tree | c8808e9b6d219840220c1e158e872d9a6433d6e5 /ui/console.c | |
parent | 67a6fcb2b06846dd37296bb901ad93a0cd87ee67 (diff) | |
download | qemu-f5360a0d287923dcf8f1f25acdd8b772970175cb.zip qemu-f5360a0d287923dcf8f1f25acdd8b772970175cb.tar.gz qemu-f5360a0d287923dcf8f1f25acdd8b772970175cb.tar.bz2 |
ui/vc: remove kbd_put_keysym() and update function calls
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 <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); |