Added joystick vibration support for most common controllers (resolves issue #159).

Added Joystick:setVibration(left, right), Joystick:getVibration, and Joystick:isVibrationSupported.
left and right are numbers between 0 and 1 which correspond to the strength of the gamepad's left and right rumble motors, if it has them.
This commit is contained in:
Alex Szpakowski
2013-10-05 01:54:41 -03:00
parent 0e6786988e
commit 8b7f151a4d
9 changed files with 279 additions and 5 deletions
+5
View File
@@ -156,6 +156,11 @@ public:
virtual int getInstanceID() const = 0;
virtual int getID() const = 0;
virtual bool isVibrationSupported() = 0;
virtual bool setVibration(float left, float right) = 0;
virtual bool setVibration() = 0;
virtual void getVibration(float &left, float &right) const = 0;
static bool getConstant(const char *in, Hat &out);
static bool getConstant(Hat in, const char *&out);