summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-31 16:24:27 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-31 16:24:27 -0300
commitec3d17b4e2b3d87ec6b46c57280ec853b264b20b (patch)
treeafa0c7e2c749926e0910e7074150da7bdeae25cf
parent9c38ad00936f89c4c6ddacfdbf0332e9f1623bca (diff)
force thread model to single-safe when running editor, fixes #2387
-rw-r--r--main/main.cpp6
-rw-r--r--modules/gdscript/gd_functions.cpp1
2 files changed, 6 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 4dca79fd55..2702c847a5 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -714,8 +714,12 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
}
- if (rtm>=0 && rtm<3)
+ if (rtm>=0 && rtm<3) {
+ if (editor) {
+ rtm=OS::RENDER_THREAD_SAFE;
+ }
OS::get_singleton()->_render_thread_mode=OS::RenderThreadMode(rtm);
+ }
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 28eb7d54de..251b0ae392 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -525,6 +525,7 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
for(int i=0;i<p_arg_count;i++) {
String os = p_args[i]->operator String();;
+
if (i==0)
str=os;
else