Allow clearing input field in Android native text input

This commit is contained in:
Sergii Pylypenko
2014-03-27 21:11:08 +02:00
parent 78ee7d507e
commit 0ea927ecb5

View File

@@ -896,6 +896,8 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeTextInput) ( JNIEnv* env, jobject thiz, jin
JNIEXPORT void JNICALL
JAVA_EXPORT_NAME(DemoRenderer_nativeTextInputFinished) ( JNIEnv* env, jobject thiz )
{
if (textInputBufferPos == 0 && textInputBuffer) // No text input - clear buffer
textInputBuffer[0] = 0;
textInputBuffer = NULL;
SDL_ANDROID_TextInputFinished = 1;
}