diff options
author | Simon Sikström <simon@andrimon.com> | 2018-11-20 13:07:24 +0100 |
---|---|---|
committer | Simon Sikström <simon@andrimon.com> | 2018-11-20 14:46:08 +0100 |
commit | 00b57d3bd2dc820dc2b0ccd20c21f6c656a92ecf (patch) | |
tree | fba8d6ca58c7258780f00f3a20af659268a30e88 | |
parent | 40765302c640dcca5e1cfec5e36955ea6a7b461b (diff) |
Adding support for java.lang.Long values in Android GodotLib.calldeferred calls
-rw-r--r-- | platform/android/java_glue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 07e4048c12..43bd841baf 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -268,11 +268,11 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { return ret; }; - if (name == "java.lang.Integer") { + if (name == "java.lang.Integer" || name == "java.lang.Long") { jclass nclass = env->FindClass("java/lang/Number"); - jmethodID intValue = env->GetMethodID(nclass, "intValue", "()I"); - int ret = env->CallIntMethod(obj, intValue); + jmethodID longValue = env->GetMethodID(nclass, "longValue", "()J"); + jlong ret = env->CallLongMethod(obj, longValue); return ret; }; |