summaryrefslogtreecommitdiffstats
path: root/main/input_default.h
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2016-07-05 14:07:46 +0200
committerAndreas Haas <liu.gam3@gmail.com>2016-07-05 14:08:02 +0200
commit45cfd199a46a6fdffb48cd367c69a336eb79590b (patch)
treea629154177841054cf8465180d5312e1a7461a37 /main/input_default.h
parent716dfa67a3c5a0a38205179c01676e05a718d244 (diff)
downloadredot-engine-45cfd199a46a6fdffb48cd367c69a336eb79590b.tar.gz
Input: add get_connected_joysticks() method.
fixes #5465
Diffstat (limited to 'main/input_default.h')
-rw-r--r--main/input_default.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/input_default.h b/main/input_default.h
index c7fef8374c..644af15e3b 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -75,6 +75,7 @@ class InputDefault : public Input {
struct Joystick {
StringName name;
StringName uid;
+ bool connected;
bool last_buttons[JOY_BUTTON_MAX + 19]; //apparently SDL specifies 35 possible buttons on android
float last_axis[JOY_AXIS_MAX];
float filter;
@@ -93,6 +94,7 @@ class InputDefault : public Input {
last_buttons[i] = false;
}
+ connected = false;
last_hat = HAT_MASK_CENTER;
filter = 0.01f;
mapping = -1;
@@ -168,6 +170,7 @@ public:
virtual float get_joy_axis(int p_device,int p_axis);
String get_joy_name(int p_idx);
+ virtual Array get_connected_joysticks();
virtual Vector2 get_joy_vibration_strength(int p_device);
virtual float get_joy_vibration_duration(int p_device);
virtual uint64_t get_joy_vibration_timestamp(int p_device);