OSDN Git Service

sdl2: remove sdl2_reset_keys() function
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 22 Jan 2019 09:28:08 +0000 (10:28 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 5 Feb 2019 09:45:44 +0000 (10:45 +0100)
No users left, dead code.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190122092814.14919-3-kraxel@redhat.com

include/ui/sdl2.h
ui/sdl2-input.c

index f6db642..71f5cfc 100644 (file)
@@ -44,7 +44,6 @@ void sdl2_window_destroy(struct sdl2_console *scon);
 void sdl2_window_resize(struct sdl2_console *scon);
 void sdl2_poll_events(struct sdl2_console *scon);
 
-void sdl2_reset_keys(struct sdl2_console *scon);
 void sdl2_process_key(struct sdl2_console *scon,
                       SDL_KeyboardEvent *ev);
 
index 1378b63..208266c 100644 (file)
 
 static uint8_t modifiers_state[SDL_NUM_SCANCODES];
 
-void sdl2_reset_keys(struct sdl2_console *scon)
-{
-    QemuConsole *con = scon ? scon->dcl.con : NULL;
-    int i;
-
-    for (i = 0 ;
-         i < SDL_NUM_SCANCODES && i < qemu_input_map_usb_to_qcode_len ;
-         i++) {
-        if (modifiers_state[i]) {
-            int qcode = qemu_input_map_usb_to_qcode[i];
-            qemu_input_event_send_key_qcode(con, qcode, false);
-            modifiers_state[i] = 0;
-        }
-    }
-}
-
 void sdl2_process_key(struct sdl2_console *scon,
                       SDL_KeyboardEvent *ev)
 {