Commit 17f36c105c09181e3f00b0b9580884d83409a951

Cameron Gutman 2022-07-31T16:16:38

keyboard: Remove no-op calls to SDL_SetKeymap()

diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c
index e120360..3a05eb4 100644
--- a/src/video/android/SDL_androidkeyboard.c
+++ b/src/video/android/SDL_androidkeyboard.c
@@ -30,15 +30,6 @@
 
 #include "../../core/android/SDL_android.h"
 
-void Android_InitKeyboard(void)
-{
-    SDL_Keycode keymap[SDL_NUM_SCANCODES];
-
-    /* Add default scancode to key mapping */
-    SDL_GetDefaultKeymap(keymap);
-    SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES, SDL_FALSE);
-}
-
 static SDL_Scancode Android_Keycodes[] = {
     SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
     SDL_SCANCODE_SOFTLEFT, /* AKEYCODE_SOFT_LEFT */
diff --git a/src/video/android/SDL_androidkeyboard.h b/src/video/android/SDL_androidkeyboard.h
index 381c210..6bdcc87 100644
--- a/src/video/android/SDL_androidkeyboard.h
+++ b/src/video/android/SDL_androidkeyboard.h
@@ -22,7 +22,6 @@
 
 #include "SDL_androidvideo.h"
 
-extern void Android_InitKeyboard(void);
 extern int Android_OnKeyDown(int keycode);
 extern int Android_OnKeyUp(int keycode);
 
diff --git a/src/video/android/SDL_androidvideo.c b/src/video/android/SDL_androidvideo.c
index c596df8..cf8a526 100644
--- a/src/video/android/SDL_androidvideo.c
+++ b/src/video/android/SDL_androidvideo.c
@@ -201,8 +201,6 @@ Android_VideoInit(_THIS)
 
     SDL_AddDisplayMode(&_this->displays[0], &mode);
 
-    Android_InitKeyboard();
-
     Android_InitTouch();
 
     Android_InitMouse();
diff --git a/src/video/directfb/SDL_DirectFB_events.c b/src/video/directfb/SDL_DirectFB_events.c
index 4e0ec4d..9351b5b 100644
--- a/src/video/directfb/SDL_DirectFB_events.c
+++ b/src/video/directfb/SDL_DirectFB_events.c
@@ -661,7 +661,6 @@ EnumKeyboards(DFBInputDeviceID device_id,
 #if USE_MULTI_API
     SDL_Keyboard keyboard;
 #endif
-    SDL_Keycode keymap[SDL_NUM_SCANCODES];
 
     if (!cb->sys_kbd) {
         if (cb->sys_ids) {
@@ -696,12 +695,6 @@ EnumKeyboards(DFBInputDeviceID device_id,
 
         SDL_DFB_LOG("Keyboard %d - %s\n", device_id, desc.name);
 
-        SDL_GetDefaultKeymap(keymap);
-#if USE_MULTI_API
-        SDL_SetKeymap(devdata->num_keyboard, 0, keymap, SDL_NUM_SCANCODES, SDL_FALSE);
-#else
-        SDL_SetKeymap(0, keymap, SDL_NUM_SCANCODES, SDL_FALSE);
-#endif
         devdata->num_keyboard++;
 
         if (cb->sys_kbd)