Fixed Return key not sent in the SDL_ANDROID text input

This commit is contained in:
pelya
2011-06-03 14:06:27 +03:00
parent 550341ad8b
commit eb897e230a
6 changed files with 9 additions and 7 deletions

View File

@@ -696,6 +696,8 @@ void SDL_ANDROID_TextInputInit(char * buffer, int len)
JNIEXPORT void JNICALL
JAVA_EXPORT_NAME(DemoRenderer_nativeTextInput) ( JNIEnv* env, jobject thiz, jint ascii, jint unicode )
{
if( ascii == 10 )
ascii = SDLK_RETURN;
if( !textInputBuffer )
SDL_ANDROID_MainThreadPushText(ascii, unicode);
else