Adding support for java.lang.Long values in Android GodotLib.calldeferred calls
This commit is contained in:
parent
40765302c6
commit
00b57d3bd2
1 changed files with 3 additions and 3 deletions
|
@ -268,11 +268,11 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) {
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (name == "java.lang.Integer") {
|
if (name == "java.lang.Integer" || name == "java.lang.Long") {
|
||||||
|
|
||||||
jclass nclass = env->FindClass("java/lang/Number");
|
jclass nclass = env->FindClass("java/lang/Number");
|
||||||
jmethodID intValue = env->GetMethodID(nclass, "intValue", "()I");
|
jmethodID longValue = env->GetMethodID(nclass, "longValue", "()J");
|
||||||
int ret = env->CallIntMethod(obj, intValue);
|
jlong ret = env->CallLongMethod(obj, longValue);
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue