summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/godot_android.cpp4
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java4
-rw-r--r--platform/android/java_glue.cpp4
-rw-r--r--platform/android/thread_jandroid.cpp3
-rw-r--r--platform/winrt/thread_winrt.cpp2
5 files changed, 11 insertions, 6 deletions
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index edb051575f..9f909d7041 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -910,7 +910,7 @@ static Variant::Type get_jni_type(const String& p_type) {
{"java.lang.String",Variant::STRING},
{"[I",Variant::INT_ARRAY},
{"[F",Variant::REAL_ARRAY},
- {"[java.lang.String",Variant::STRING_ARRAY},
+ {"[Ljava.lang.String;",Variant::STRING_ARRAY},
{NULL,Variant::NIL}
};
@@ -941,7 +941,7 @@ static const char* get_jni_sig(const String& p_type) {
{"java.lang.String","Ljava/lang/String;"},
{"[I","[I"},
{"[F","[F"},
- {"[java.lang.String","[Ljava/lang/String;"},
+ {"[Ljava.lang.String;","[Ljava/lang/String;"},
{NULL,"V"}
};
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index cdf17e3161..4c0f4878f5 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -602,8 +602,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
mView.onResume();
- mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
- mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_NORMAL);
+ mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
+ mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME);
GodotLib.focusin();
if(use_immersive && Build.VERSION.SDK_INT >= 19.0){ // check if the application runs on an android 4.4+
Window window = getWindow();
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 1ea7cd7ebb..5fd2ab8910 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -1563,7 +1563,7 @@ static Variant::Type get_jni_type(const String& p_type) {
{"[I",Variant::INT_ARRAY},
{"[B",Variant::RAW_ARRAY},
{"[F",Variant::REAL_ARRAY},
- {"[java.lang.String",Variant::STRING_ARRAY},
+ {"[Ljava.lang.String;",Variant::STRING_ARRAY},
{"org.godotengine.godot.Dictionary", Variant::DICTIONARY},
{NULL,Variant::NIL}
};
@@ -1599,7 +1599,7 @@ static const char* get_jni_sig(const String& p_type) {
{"[I","[I"},
{"[B","[B"},
{"[F","[F"},
- {"[java.lang.String","[Ljava/lang/String;"},
+ {"[Ljava.lang.String;","[Ljava/lang/String;"},
{NULL,"V"}
};
diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp
index 1425e23c73..61ee237586 100644
--- a/platform/android/thread_jandroid.cpp
+++ b/platform/android/thread_jandroid.cpp
@@ -29,6 +29,7 @@
#include "thread_jandroid.h"
#include "os/memory.h"
+#include "script_language.h"
Thread::ID ThreadAndroid::get_ID() const {
@@ -44,8 +45,10 @@ void *ThreadAndroid::thread_callback(void *userdata) {
ThreadAndroid *t=reinterpret_cast<ThreadAndroid*>(userdata);
setup_thread();
+ ScriptServer::thread_enter(); //scripts may need to attach a stack
t->id=(ID)pthread_self();
t->callback(t->user);
+ ScriptServer::thread_exit();
return NULL;
}
diff --git a/platform/winrt/thread_winrt.cpp b/platform/winrt/thread_winrt.cpp
index 097050e511..e7028bd9dc 100644
--- a/platform/winrt/thread_winrt.cpp
+++ b/platform/winrt/thread_winrt.cpp
@@ -33,6 +33,8 @@
Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_user,const Settings&) {
ThreadWinrt* thread = memnew(ThreadWinrt);
+
+
std::thread new_thread(p_callback, p_user);
std::swap(thread->thread, new_thread);