Gamepad rumble not working

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
aeTIos
Prole
Posts: 3
Joined: Wed May 08, 2013 6:17 pm

Gamepad rumble not working

Post 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 :)
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Gamepad rumble not working

Post 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.
aeTIos
Prole
Posts: 3
Joined: Wed May 08, 2013 6:17 pm

Re: Gamepad rumble not working

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests