mirror of https://github.com/encounter/SDL.git
keyboard: Remove no-op calls to SDL_SetKeymap()
This commit is contained in:
parent
9515fb2501
commit
17f36c105c
|
@ -30,15 +30,6 @@
|
||||||
|
|
||||||
#include "../../core/android/SDL_android.h"
|
#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[] = {
|
static SDL_Scancode Android_Keycodes[] = {
|
||||||
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
|
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_UNKNOWN */
|
||||||
SDL_SCANCODE_SOFTLEFT, /* AKEYCODE_SOFT_LEFT */
|
SDL_SCANCODE_SOFTLEFT, /* AKEYCODE_SOFT_LEFT */
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include "SDL_androidvideo.h"
|
#include "SDL_androidvideo.h"
|
||||||
|
|
||||||
extern void Android_InitKeyboard(void);
|
|
||||||
extern int Android_OnKeyDown(int keycode);
|
extern int Android_OnKeyDown(int keycode);
|
||||||
extern int Android_OnKeyUp(int keycode);
|
extern int Android_OnKeyUp(int keycode);
|
||||||
|
|
||||||
|
|
|
@ -201,8 +201,6 @@ Android_VideoInit(_THIS)
|
||||||
|
|
||||||
SDL_AddDisplayMode(&_this->displays[0], &mode);
|
SDL_AddDisplayMode(&_this->displays[0], &mode);
|
||||||
|
|
||||||
Android_InitKeyboard();
|
|
||||||
|
|
||||||
Android_InitTouch();
|
Android_InitTouch();
|
||||||
|
|
||||||
Android_InitMouse();
|
Android_InitMouse();
|
||||||
|
|
|
@ -661,7 +661,6 @@ EnumKeyboards(DFBInputDeviceID device_id,
|
||||||
#if USE_MULTI_API
|
#if USE_MULTI_API
|
||||||
SDL_Keyboard keyboard;
|
SDL_Keyboard keyboard;
|
||||||
#endif
|
#endif
|
||||||
SDL_Keycode keymap[SDL_NUM_SCANCODES];
|
|
||||||
|
|
||||||
if (!cb->sys_kbd) {
|
if (!cb->sys_kbd) {
|
||||||
if (cb->sys_ids) {
|
if (cb->sys_ids) {
|
||||||
|
@ -696,12 +695,6 @@ EnumKeyboards(DFBInputDeviceID device_id,
|
||||||
|
|
||||||
SDL_DFB_LOG("Keyboard %d - %s\n", device_id, desc.name);
|
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++;
|
devdata->num_keyboard++;
|
||||||
|
|
||||||
if (cb->sys_kbd)
|
if (cb->sys_kbd)
|
||||||
|
|
Loading…
Reference in New Issue