Revert "Attempt to fix Android async text input"

This reverts commit e48232345a.
This commit is contained in:
pelya
2017-04-02 01:58:00 +03:00
committed by Sergii Pylypenko
parent 362d839e08
commit 040aa274b4

View File

@@ -47,7 +47,6 @@ enum OskActivation {
};
static char _android_text_input[512];
static bool _android_text_input_active = false;
static const NWidgetPart _nested_land_info_widgets[] = {
@@ -776,9 +775,8 @@ void QueryString::HandleEditBox(Window *w, int wid)
if (w->window_class == WC_OSK) w->InvalidateData();
}
#ifdef __ANDROID__
if (_android_text_input_active) {
if (SDL_IsScreenKeyboardShown(NULL)) {
if (SDL_ANDROID_GetScreenKeyboardTextInputAsync(_android_text_input, sizeof(_android_text_input)) == SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED) {
_android_text_input_active = false;
this->text.Assign(_android_text_input);
w->OnEditboxChanged(wid);
}
@@ -966,10 +964,8 @@ void QueryString::ClickEditBox(Window *w, Point pt, int wid, int click_count, bo
}
#ifdef __ANDROID__
strecpy(_android_text_input, this->text.buf, lastof(_android_text_input));
//this->text.DeleteAll();
_android_text_input_active = true;
this->text.DeleteAll();
if (SDL_ANDROID_GetScreenKeyboardTextInputAsync(_android_text_input, sizeof(_android_text_input)) == SDL_ANDROID_TEXTINPUT_ASYNC_FINISHED) {
_android_text_input_active = false;
this->text.Assign(_android_text_input);
w->OnEditboxChanged(wid);
}