diff options
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 e4d61794bb..4c07791ac7 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); |