summaryrefslogtreecommitdiffstats
path: root/core/os/input.cpp
diff options
context:
space:
mode:
authorWilhem Barbier <nounoursheureux@openmailbox.org>2016-06-15 07:25:35 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-06-15 07:25:35 +0200
commitf665200df7bd6d1660f6dd8255ad66f5c675770d (patch)
tree8686ad14a09013631c5a5853ff7a77c0bca6d64d /core/os/input.cpp
parent333de40180d7d8d6890cceaa1bc3d46efa2b5083 (diff)
downloadredot-engine-f665200df7bd6d1660f6dd8255ad66f5c675770d.tar.gz
Add joystick vibration support on Linux (#5043)
Diffstat (limited to 'core/os/input.cpp')
-rw-r--r--core/os/input.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp
index a766ef87fc..005a248aac 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -59,6 +59,10 @@ 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_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);
+ ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);
ObjectTypeDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer);
//ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want