Page 1 of 1

Gamepad rumble not working

Posted: Wed May 14, 2014 9:50 am
by aeTIos
So I recently got a gamepad, so of course I tried it out with the love.joystick library. Everything is working fine, except I can't get my gamepad to rumble :(
I know that my gamepad supports rumble, because when I'm playing DiRT, GRID and moar games, it almost rumbles out of my hand (cough cough exaggeration cough). Also I have a transparent one (THIS one, if you're interested) so I can see the vibration motors sit right there.
The code I use is as follows:

Code: Select all

function love.load()
	local joysticks = love.joystick.getJoysticks()
	a = joysticks[1]
	a:isVibrationSupported()
	a:setVibration(1,1)
end
I found out that putting setVibration() in a loop causes a lot of lag, so at least something is happening.
I'll try running with a shell open to see the feedback.
TIA and greetings :)

Re: Gamepad rumble not working

Posted: Wed May 14, 2014 5:30 pm
by slime
There might be some bugs in the rumble code in SDL2 (the library LÖVE uses for gamepad and rumble support, among other things.) Some of it might have been fixed recently, although I don't have a new SDL2.dll handy.
The return values of a:isVibrationSupported() and a:setVibration(1,1) might help give some insight.

Re: Gamepad rumble not working

Posted: Tue May 20, 2014 2:18 pm
by aeTIos
I'll try to get some feedback from those values. Will update this post.

Edit - both calls return false. I guess I'll have to live with it till it gets fixed.