Skip to content

Commit 57038b3

Browse files
author
Maksim
authoredApr 16, 2020
Android: fix formspec input for AArch64 devices (#9685)
1 parent 45999b7 commit 57038b3

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed
 

‎src/gui/guiFormSpecMenu.cpp

+9-13
Original file line numberDiff line numberDiff line change
@@ -3346,28 +3346,24 @@ bool GUIFormSpecMenu::getAndroidUIInput()
33463346
if (!hasAndroidUIInput())
33473347
return false;
33483348

3349+
// still waiting
3350+
if (porting::getInputDialogState() == -1)
3351+
return true;
3352+
33493353
std::string fieldname = m_jni_field_name;
33503354
m_jni_field_name.clear();
33513355

3352-
for (std::vector<FieldSpec>::iterator iter = m_fields.begin();
3353-
iter != m_fields.end(); ++iter) {
3354-
3355-
if (iter->fname != fieldname) {
3356+
for (const FieldSpec &field : m_fields) {
3357+
if (field.fname != fieldname)
33563358
continue;
3357-
}
3358-
IGUIElement *tochange = getElementFromId(iter->fid, true);
33593359

3360-
if (tochange == 0) {
3361-
return false;
3362-
}
3360+
IGUIElement *element = getElementFromId(field.fid, true);
33633361

3364-
if (tochange->getType() != irr::gui::EGUIET_EDIT_BOX) {
3362+
if (!element || element->getType() != irr::gui::EGUIET_EDIT_BOX)
33653363
return false;
3366-
}
33673364

33683365
std::string text = porting::getInputDialogValue();
3369-
3370-
((gui::IGUIEditBox *)tochange)->setText(utf8_to_wide(text).c_str());
3366+
((gui::IGUIEditBox *)element)->setText(utf8_to_wide(text).c_str());
33713367
}
33723368
return false;
33733369
}

0 commit comments

Comments
 (0)
Please sign in to comment.