diff options
| author | punto- <ariel@godotengine.org> | 2016-07-10 14:00:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-10 14:00:27 -0300 |
| commit | bba89aef3b01d96a0a14e93d9f78b068d3f3f8ca (patch) | |
| tree | 9527afa178ee0c08a54d125669029e56f64e851b /core | |
| parent | e468bf25442648537abd9d31c6973bfc70ffc7ae (diff) | |
| parent | 45cfd199a46a6fdffb48cd367c69a336eb79590b (diff) | |
Merge pull request #5559 from Hinsbart/connected_joysticks
Input: add get_connected_joysticks() method.
Diffstat (limited to 'core')
| -rw-r--r-- | core/os/input.cpp | 1 | ||||
| -rw-r--r-- | core/os/input.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index dacddc0928..efbae57950 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -59,6 +59,7 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis); ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name); ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid); + ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks); ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength); ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration); ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0)); diff --git a/core/os/input.h b/core/os/input.h index fa2cef5467..d11703470b 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -62,6 +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 Array get_connected_joysticks()=0; virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name, String p_guid)=0; virtual void add_joy_mapping(String p_mapping, bool p_update_existing=false)=0; virtual void remove_joy_mapping(String p_guid)=0; |