From af633c794179d29a4bf0c01983c8b08d14553596 Mon Sep 17 00:00:00 2001 From: hondres Date: Fri, 18 Dec 2015 06:12:53 +0100 Subject: Better gamepad support --- core/os/input.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/os/input.h b/core/os/input.h index 8aa0e6b18a..d81ebf4ec3 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -62,7 +62,7 @@ public: virtual float get_joy_axis(int p_device,int p_axis)=0; virtual String get_joy_name(int p_idx)=0; - virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name)=0; + virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name, String p_guid)=0; virtual Point2 get_mouse_pos() const=0; -- cgit v1.2.3 From f25812794d7c18aee35d7e4faff70890a95cd4db Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Fri, 18 Dec 2015 03:06:51 -0300 Subject: thread renaming by core_bind --- core/bind/core_bind.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 743ae19a93..a5f778deb4 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1883,6 +1883,13 @@ void _Thread::_start_func(void *ud) { Variant::CallError ce; const Variant* arg[1]={&t->userdata}; + if (t->name == "") { + // come up with a better name using maybe the filename on the Script? + t->thread->set_name(t->target_method); + } else { + t->thread->set_name(t->name); + }; + t->ret=t->target_instance->call(t->target_method,arg,1,ce); if (ce.error!=Variant::CallError::CALL_OK) { @@ -1941,9 +1948,6 @@ Error _Thread::start(Object *p_instance,const StringName& p_method,const Variant return ERR_CANT_CREATE; } - if (name != "") - thread->set_name(name); - return OK; } -- cgit v1.2.3 From b989d4f887b6c823850e92ab7c5d47311de59b9d Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Fri, 18 Dec 2015 09:48:39 -0300 Subject: thread can't rename itself on initialization :( --- core/bind/core_bind.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index a5f778deb4..438db5d518 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1883,11 +1883,12 @@ void _Thread::_start_func(void *ud) { Variant::CallError ce; const Variant* arg[1]={&t->userdata}; + // we don't know our thread pointer yet :( if (t->name == "") { // come up with a better name using maybe the filename on the Script? - t->thread->set_name(t->target_method); + //t->thread->set_name(t->target_method); } else { - t->thread->set_name(t->name); + //t->thread->set_name(t->name); }; t->ret=t->target_instance->call(t->target_method,arg,1,ce); -- cgit v1.2.3