1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

fix android build

This commit is contained in:
Andrii Danylchenko
2018-05-25 22:08:14 +03:00
parent 20161a2449
commit ee033e9c9c
6 changed files with 27 additions and 7 deletions

View File

@@ -633,12 +633,12 @@ void CTextInput::notifyAndroidTextInputChanged(std::string & text)
auto fun = [&text](JNIEnv * env, jclass cls, jmethodID method)
{
auto jtext = env->NewStringUTF(text.c_str());
env->CallStaticObjectMethod(cls, method, jtext);
env->CallStaticVoidMethod(cls, method, jtext);
env->DeleteLocalRef(jtext);
};
CAndroidVMHelper vmHelper;
vmHelper.callCustomMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "notifyTextInputChanged",
"(Ljava/lang/String;)V", fun);
"(Ljava/lang/String;)V", fun, true);
}
#endif //VCMI_ANDROID