diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-08-30 13:38:18 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-04 14:57:44 +0400 |
commit | 9db018ac56119ee8e0a87a1a340276e4c8d86392 (patch) | |
tree | 37f7b15625b946966332d6c8ea515b9f64bf24a1 /ui/sdl2-input.c | |
parent | 32aa1f8dee3b2e8a4606bc2836a022f1ff5e7f0c (diff) | |
download | qemu-9db018ac56119ee8e0a87a1a340276e4c8d86392.zip qemu-9db018ac56119ee8e0a87a1a340276e4c8d86392.tar.gz qemu-9db018ac56119ee8e0a87a1a340276e4c8d86392.tar.bz2 |
ui/vc: change the argument for QemuTextConsole
Those functions are specifc to text/vc console, make that explicit from
the argument type.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-45-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/sdl2-input.c')
-rw-r--r-- | ui/sdl2-input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index f068382..a318cc5 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -43,15 +43,16 @@ void sdl2_process_key(struct sdl2_console *scon, ev->type == SDL_KEYDOWN ? "down" : "up"); qkbd_state_key_event(scon->kbd, qcode, ev->type == SDL_KEYDOWN); - if (!qemu_console_is_graphic(con)) { + if (QEMU_IS_TEXT_CONSOLE(con)) { + QemuTextConsole *s = QEMU_TEXT_CONSOLE(con); bool ctrl = qkbd_state_modifier_get(scon->kbd, QKBD_MOD_CTRL); if (ev->type == SDL_KEYDOWN) { switch (qcode) { case Q_KEY_CODE_RET: - kbd_put_keysym_console(con, '\n'); + kbd_put_keysym_console(s, '\n'); break; default: - kbd_put_qcode_console(con, qcode, ctrl); + kbd_put_qcode_console(s, qcode, ctrl); break; } } |