We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3538

Summary: Rumble not uploading correctly on Linux (Invalid argument)
Product: SDL Reporter: Angelo <spansjh>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.5   
Hardware: x86_64   
OS: Linux   

Description Angelo 2016-12-30 12:02:13 UTC
The fix seems to be, instead of:

  linux_effect.id = effect->hweffect->effect.id;

We do:

  linux_effect.id = -1;

According to this page, -1 should be used as an ID for new effects: http://freegamedev.net/wiki/Force_Feedback

Without -1, I get an "Invalid argument" error in the ioctl call.
Comment 1 Angelo 2016-12-30 12:40:10 UTC
This "fix" does however cause the gamepad to run out of available space for effects, so this is not a good fix.
Comment 2 Angelo 2016-12-30 13:55:39 UTC
A little update on this, it seems to work if I try to run the rumble on my Xbox 360 gamepad via the Joystick interface, but not via the Gamepad interface. (eg. SDL_HapticOpen instead of SDL_HapticOpenFromJoystick)
Comment 3 Angelo 2016-12-30 15:46:21 UTC
Consider this inavlid, it seems like initializing Fmod causes these effects to be invalidated. (Why, though? Fmod doesn't have any rumble abilities, does it? Odd..)