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
+1 -1
View File
@@ -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