diff --git a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/Pandemonium.java b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/Pandemonium.java index f843e2fab..d823d2a73 100644 --- a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/Pandemonium.java +++ b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/Pandemonium.java @@ -723,7 +723,7 @@ public class Pandemonium extends Fragment implements SensorEventListener, IDownl mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); - PandemoniumLib.initialize(activity, this, activity.getAssets(), io, netUtils, directoryAccessHandler, fileAccessHandler, use_apk_expansion); + PandemoniumLib.initialize(activity, this, activity.getAssets(), io, netUtils, directoryAccessHandler, fileAccessHandler, use_apk_expansion, tts); result_callback = null; diff --git a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java index 0ac350021..a3188937d 100644 --- a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java +++ b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java @@ -33,6 +33,7 @@ package org.pandemoniumengine.pandemonium; import org.pandemoniumengine.pandemonium.io.directory.DirectoryAccessHandler; import org.pandemoniumengine.pandemonium.io.file.FileAccessHandler; +import org.pandemoniumengine.pandemonium.tts.PandemoniumTTS; import org.pandemoniumengine.pandemonium.utils.PandemoniumNetUtils; import android.app.Activity; @@ -52,7 +53,7 @@ public class PandemoniumLib { /** * Invoked on the main thread to initialize Pandemonium native layer. */ - public static native void initialize(Activity activity, Pandemonium p_instance, AssetManager p_asset_manager, PandemoniumIO pandemoniumIO, PandemoniumNetUtils netUtils, DirectoryAccessHandler directoryAccessHandler, FileAccessHandler fileAccessHandler, boolean use_apk_expansion); + public static native void initialize(Activity activity, Pandemonium p_instance, AssetManager p_asset_manager, PandemoniumIO pandemoniumIO, PandemoniumNetUtils netUtils, DirectoryAccessHandler directoryAccessHandler, FileAccessHandler fileAccessHandler, boolean use_apk_expansion, GodotTTS tts); /** * Invoked on the main thread to clean up Pandemonium native layer. diff --git a/platform/android/java_pandemonium_lib_jni.cpp b/platform/android/java_pandemonium_lib_jni.cpp index 238558d01..26256053f 100644 --- a/platform/android/java_pandemonium_lib_jni.cpp +++ b/platform/android/java_pandemonium_lib_jni.cpp @@ -160,7 +160,7 @@ JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_set } } -JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_initialize(JNIEnv *env, jclass clazz, jobject p_activity, jobject p_pandemonium_instance, jobject p_asset_manager, jobject p_pandemonium_io, jobject p_net_utils, jobject p_directory_access_handler, jobject p_file_access_handler, jboolean p_use_apk_expansion) { +JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_initialize(JNIEnv *env, jclass clazz, jobject p_activity, jobject p_pandemonium_instance, jobject p_asset_manager, jobject p_pandemonium_io, jobject p_net_utils, jobject p_directory_access_handler, jobject p_file_access_handler, jboolean p_use_apk_expansion, jobject p_godot_tts) { initialized = true; JavaVM *jvm; @@ -179,7 +179,7 @@ JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_ini DirAccessJAndroid::setup(p_directory_access_handler); FileAccessFilesystemJAndroid::setup(p_file_access_handler); NetSocketAndroid::setup(p_net_utils); - TTS_Android::setup(godot_java->get_member_object("tts", "Lorg/pandemoniumengine/pandemonium/tts/PandemoniumTTS;", env)); + TTS_Android::setup(p_godot_tts); os_android = new OS_Android(pandemonium_java, pandemonium_io_java, p_use_apk_expansion); diff --git a/platform/android/java_pandemonium_lib_jni.h b/platform/android/java_pandemonium_lib_jni.h index bb576c9fa..f55077468 100644 --- a/platform/android/java_pandemonium_lib_jni.h +++ b/platform/android/java_pandemonium_lib_jni.h @@ -39,7 +39,7 @@ // See java/src/org/pandemoniumengine/pandemonium/PandemoniumLib.java for the JAVA side of this (yes that's why we have the long names) extern "C" { -JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_initialize(JNIEnv *env, jclass clazz, jobject p_activity, jobject p_pandemonium_instance, jobject p_asset_manager, jobject p_pandemonium_io, jobject p_net_utils, jobject p_directory_access_handler, jobject p_file_access_handler, jboolean p_use_apk_expansion); +JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_initialize(JNIEnv *env, jclass clazz, jobject p_activity, jobject p_pandemonium_instance, jobject p_asset_manager, jobject p_pandemonium_io, jobject p_net_utils, jobject p_directory_access_handler, jobject p_file_access_handler, jboolean p_use_apk_expansion, jobject p_godot_tts); JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_ondestroy(JNIEnv *env, jclass clazz); JNIEXPORT jboolean JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_setup(JNIEnv *env, jclass clazz, jobjectArray p_cmdline); JNIEXPORT void JNICALL Java_org_pandemoniumengine_pandemonium_PandemoniumLib_resize(JNIEnv *env, jclass clazz, jint width, jint height);