diff --git a/project/java/MainActivity.java b/project/java/MainActivity.java index 084f9d7e2..8fd8caacc 100644 --- a/project/java/MainActivity.java +++ b/project/java/MainActivity.java @@ -791,7 +791,6 @@ public class MainActivity extends Activity public void showScreenKeyboard(final String oldText) { - Log.i("SDL", "showScreenKeyboard()"); if(Globals.CompatibilityHacksTextInputEmulatesHwKeyboard) { showScreenKeyboardWithoutTextInputField(Globals.TextInputKeyboard); @@ -799,7 +798,6 @@ public class MainActivity extends Activity } if(_screenKeyboard != null) return; - Log.i("SDL", "showScreenKeyboard() - adding keyboard view"); class simpleKeyListener implements OnKeyListener { MainActivity _parent; @@ -819,7 +817,6 @@ public class MainActivity extends Activity keyCode == KeyEvent.KEYCODE_BUTTON_3 || keyCode == KeyEvent.KEYCODE_BUTTON_4 )) { - Log.i("SDL", "_parent.hideScreenKeyboard()"); _parent.hideScreenKeyboard(); return true; } @@ -907,7 +904,6 @@ public class MainActivity extends Activity public void hideScreenKeyboard() { - Log.i("SDL", "hideScreenKeyboard()"); if( keyboardWithoutTextInputShown ) showScreenKeyboardWithoutTextInputField(Globals.TextInputKeyboard); @@ -922,7 +918,6 @@ public class MainActivity extends Activity DemoRenderer.nativeTextInput( (int)text.charAt(i), (int)text.codePointAt(i) ); } } - Log.i("SDL", "hideScreenKeyboard() nativeTextInputFinished()"); DemoRenderer.nativeTextInputFinished(); _inputManager.hideSoftInputFromWindow(_screenKeyboard.getWindowToken(), 0); _videoLayout.removeView(_screenKeyboard); diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c index e4d31f434..2bb8875a3 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.c @@ -327,7 +327,7 @@ void SDL_ANDROID_CallJavaHideScreenKeyboard() int SDL_ANDROID_IsScreenKeyboardShown() { - return SDL_ANDROID_IsScreenKeyboardShownFlag; + return SDL_ANDROID_IsScreenKeyboardShownFlag || SDL_ANDROID_AsyncTextInputActive; } JNIEXPORT void JNICALL diff --git a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h index e25573b24..5586ad534 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h +++ b/project/jni/sdl-1.2/src/video/android/SDL_androidvideo.h @@ -71,6 +71,7 @@ extern void SDL_ANDROID_CallJavaHideScreenKeyboard(); extern void SDL_ANDROID_CallJavaSetScreenKeyboardHintMessage(const char *hint); extern int SDL_ANDROID_IsScreenKeyboardShown(); extern int SDL_ANDROID_IsScreenKeyboardShownFlag; +extern int SDL_ANDROID_AsyncTextInputActive; extern int SDL_ANDROID_drawTouchscreenKeyboard(); extern void SDL_ANDROID_VideoContextLost(); extern void SDL_ANDROID_VideoContextRecreated(); diff --git a/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c b/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c index e3e9d75b8..20e053040 100644 --- a/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c +++ b/project/jni/sdl-1.2/src/video/android/SDL_touchscreenkeyboard.c @@ -96,7 +96,7 @@ static int themeType = 0; static int joystickTouchPoints[MAX_JOYSTICKS*2]; static int floatingScreenJoystick = 0; -static int asyncTextInputActive = 0; +int SDL_ANDROID_AsyncTextInputActive = 0; static void R_DumpOpenGlState(void); @@ -1249,12 +1249,12 @@ SDL_AndroidTextInputAsyncStatus_t SDLCALL SDL_ANDROID_GetScreenKeyboardTextInput if( SDL_ANDROID_TextInputFinished ) { SDL_ANDROID_TextInputFinished = 0; - asyncTextInputActive = 0; + SDL_ANDROID_AsyncTextInputActive = 0; return SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED; } - if( !SDL_ANDROID_IsScreenKeyboardShownFlag && !asyncTextInputActive ) + if( !SDL_ANDROID_IsScreenKeyboardShownFlag && !SDL_ANDROID_AsyncTextInputActive ) { - asyncTextInputActive = 1; + SDL_ANDROID_AsyncTextInputActive = 1; SDL_ANDROID_CallJavaShowScreenKeyboard(textBuf, textBuf, textBufSize, 1); } return SDL_ANDROID_TEXTINPUT_ASYNC_IN_PROGRESS;