mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
32aa1f8dee
commit
9db018ac56
5 changed files with 16 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue