mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user