mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +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:
@@ -31,7 +31,7 @@ namespace
|
||||
{
|
||||
std::string getDriveRoot(const std::string &input)
|
||||
{
|
||||
for (int i = 0; i < input.size(); ++i)
|
||||
for (size_t i = 0; i < input.size(); ++i)
|
||||
if (input[i] == '/' || input[i] == '\\')
|
||||
return input.substr(0, i+1);
|
||||
// Something's horribly wrong
|
||||
|
||||
Reference in New Issue
Block a user