File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -3346,28 +3346,24 @@ bool GUIFormSpecMenu::getAndroidUIInput()
3346
3346
if (!hasAndroidUIInput ())
3347
3347
return false ;
3348
3348
3349
+ // still waiting
3350
+ if (porting::getInputDialogState () == -1 )
3351
+ return true ;
3352
+
3349
3353
std::string fieldname = m_jni_field_name;
3350
3354
m_jni_field_name.clear ();
3351
3355
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)
3356
3358
continue ;
3357
- }
3358
- IGUIElement *tochange = getElementFromId (iter->fid , true );
3359
3359
3360
- if (tochange == 0 ) {
3361
- return false ;
3362
- }
3360
+ IGUIElement *element = getElementFromId (field.fid , true );
3363
3361
3364
- if (tochange ->getType () != irr::gui::EGUIET_EDIT_BOX) {
3362
+ if (!element || element ->getType () != irr::gui::EGUIET_EDIT_BOX)
3365
3363
return false ;
3366
- }
3367
3364
3368
3365
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 ());
3371
3367
}
3372
3368
return false ;
3373
3369
}
You can’t perform that action at this time.
0 commit comments