diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/input-legacy.c | 4 | ||||
-rw-r--r-- | ui/input.c | 12 | ||||
-rw-r--r-- | ui/vnc.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/ui/input-legacy.c b/ui/input-legacy.c index a5f1e829c3..6bc3525499 100644 --- a/ui/input-legacy.c +++ b/ui/input-legacy.c @@ -62,8 +62,8 @@ int index_from_key(const char *key, size_t key_length) int i; for (i = 0; i < Q_KEY_CODE__MAX; i++) { - if (!strncmp(key, QKeyCode_lookup[i], key_length) && - !QKeyCode_lookup[i][key_length]) { + if (!strncmp(key, QKeyCode_str(i), key_length) && + !QKeyCode_str(i)[key_length]) { break; } } diff --git a/ui/input.c b/ui/input.c index af05f06368..3422d4a8ef 100644 --- a/ui/input.c +++ b/ui/input.c @@ -151,7 +151,7 @@ void qmp_input_send_event(bool has_device, const char *device, if (!qemu_input_find_handler(1 << event->type, con)) { error_setg(errp, "Input handler not found for " "event type %s", - InputEventKind_lookup[event->type]); + InputEventKind_str(event->type)); return; } } @@ -213,12 +213,12 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt) switch (key->key->type) { case KEY_VALUE_KIND_NUMBER: qcode = qemu_input_key_number_to_qcode(key->key->u.number.data); - name = QKeyCode_lookup[qcode]; + name = QKeyCode_str(qcode); trace_input_event_key_number(idx, key->key->u.number.data, name, key->down); break; case KEY_VALUE_KIND_QCODE: - name = QKeyCode_lookup[key->key->u.qcode.data]; + name = QKeyCode_str(key->key->u.qcode.data); trace_input_event_key_qcode(idx, name, key->down); break; case KEY_VALUE_KIND__MAX: @@ -228,17 +228,17 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt) break; case INPUT_EVENT_KIND_BTN: btn = evt->u.btn.data; - name = InputButton_lookup[btn->button]; + name = InputButton_str(btn->button); trace_input_event_btn(idx, name, btn->down); break; case INPUT_EVENT_KIND_REL: move = evt->u.rel.data; - name = InputAxis_lookup[move->axis]; + name = InputAxis_str(move->axis); trace_input_event_rel(idx, name, move->value); break; case INPUT_EVENT_KIND_ABS: move = evt->u.abs.data; - name = InputAxis_lookup[move->axis]; + name = InputAxis_str(move->axis); trace_input_event_abs(idx, name, move->value); break; case INPUT_EVENT_KIND__MAX: @@ -131,7 +131,7 @@ static void vnc_init_basic_info(SocketAddress *addr, case SOCKET_ADDRESS_TYPE_VSOCK: case SOCKET_ADDRESS_TYPE_FD: error_setg(errp, "Unsupported socket address type %s", - SocketAddressType_lookup[addr->type]); + SocketAddressType_str(addr->type)); break; default: abort(); @@ -416,7 +416,7 @@ VncInfo *qmp_query_vnc(Error **errp) case SOCKET_ADDRESS_TYPE_VSOCK: case SOCKET_ADDRESS_TYPE_FD: error_setg(errp, "Unsupported socket address type %s", - SocketAddressType_lookup[addr->type]); + SocketAddressType_str(addr->type)); goto out_error; default: abort(); @@ -1839,7 +1839,7 @@ static void vnc_release_modifiers(VncState *vs) static const char *code2name(int keycode) { - return QKeyCode_lookup[qemu_input_key_number_to_qcode(keycode)]; + return QKeyCode_str(qemu_input_key_number_to_qcode(keycode)); } static void key_event(VncState *vs, int down, uint32_t sym) |