Fixed international text input in XServer

This commit is contained in:
pelya
2014-02-23 19:26:20 +02:00
parent b278d1801a
commit 881a7daf70
8 changed files with 131 additions and 105 deletions

View File

@@ -91,7 +91,7 @@ extern void SDL_ANDROID_MainThreadPushMouseButton(int pressed, int button)
SDL_ANDROID_currentMouseButtons &= ~(SDL_BUTTON(button));
}
extern void SDL_ANDROID_MainThreadPushKeyboardKey(int pressed, SDL_scancode key)
extern void SDL_ANDROID_MainThreadPushKeyboardKey(int pressed, SDL_scancode key, int unicode)
{
SDL_keysym keysym;
@@ -174,11 +174,17 @@ extern void SDL_ANDROID_MainThreadPushKeyboardKey(int pressed, SDL_scancode key)
#else
if ( SDL_TranslateUNICODE )
#endif
keysym.unicode = key;
keysym.unicode = unicode;
if( (keysym.unicode & 0xFF80) != 0 )
keysym.sym = SDLK_WORLD_0;
//else if( keysym.sym < 0x80 )
// keysym.unicode = keysym.sym;
if( pressed == SDL_RELEASED )
keysym.unicode = 0;
//__android_log_print(ANDROID_LOG_INFO, "libSDL","SDL_SendKeyboardKey sym %d scancode %d unicode %d", keysym.sym, keysym.scancode, keysym.unicode);
SDL_SendKeyboardKey( pressed, &keysym );
}