diff options
Diffstat (limited to 'platform/android/java_glue.cpp')
-rw-r--r-- | platform/android/java_glue.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index e67388b6f5..f948095c62 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -753,7 +753,7 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_initialize(JNIEnv * env, int cmdlen=0; bool use_apk_expansion=false; if (p_cmdline) { - int cmdlen = env->GetArrayLength(p_cmdline); + cmdlen = env->GetArrayLength(p_cmdline); if (cmdlen) { cmdline = (const char**)malloc((env->GetArrayLength(p_cmdline)+1)*sizeof(const char*)); cmdline[cmdlen]=NULL; @@ -776,6 +776,8 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_initialize(JNIEnv * env, } } + __android_log_print(ANDROID_LOG_INFO,"godot","CMDLINE LEN %i - APK EXPANSION %I\n",cmdlen,int(use_apk_expansion)); + os_android = new OS_Android(_gfx_init_func,env,_open_uri,_get_data_dir,_get_locale, _get_model,_show_vk, _hide_vk,_set_screen_orient,_get_unique_id, _play_video, _is_video_playing, _pause_video, _stop_video,use_apk_expansion); os_android->set_need_reload_hooks(p_need_reload_hook); @@ -1552,7 +1554,9 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_callobject(JNIEnv * env, for (int i=0; i<count; i++) { jobject obj = env->GetObjectArrayElement(params, i); - Variant v = _jobject_to_variant(env, obj); + Variant v; + if (obj) + v=_jobject_to_variant(env, obj); memnew_placement(&vlist[i], Variant); vlist[i] = v; vptr[i] = &vlist[i]; @@ -1578,7 +1582,8 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_calldeferred(JNIEnv * env for (int i=0; i<MIN(count,VARIANT_ARG_MAX); i++) { jobject obj = env->GetObjectArrayElement(params, i); - args[i] = _jobject_to_variant(env, obj); + if (obj) + args[i] = _jobject_to_variant(env, obj); print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; |