From 00b57d3bd2dc820dc2b0ccd20c21f6c656a92ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sikstr=C3=B6m?= Date: Tue, 20 Nov 2018 13:07:24 +0100 Subject: [PATCH] Adding support for java.lang.Long values in Android GodotLib.calldeferred calls --- platform/android/java_glue.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 07e4048c1207..43bd841baf96 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; };