From 17f36c105c09181e3f00b0b9580884d83409a951 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 31 Jul 2022 16:16:38 -0500 Subject: [PATCH] keyboard: Remove no-op calls to SDL_SetKeymap() --- src/video/android/SDL_androidkeyboard.c | 9 --------- src/video/android/SDL_androidkeyboard.h | 1 - src/video/android/SDL_androidvideo.c | 2 -- src/video/directfb/SDL_DirectFB_events.c | 7 ------- 4 files changed, 19 deletions(-) diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c index e120360ea..3a05eb445 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 381c2100e..6bdcc87be 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 c596df8b2..cf8a526e2 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 4e0ec4d9f..9351b5b1c 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)