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 - Rumble not uploading correctly on Linux (Invalid argument)
Summary: Rumble not uploading correctly on Linux (Invalid argument)
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.5
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-30 12:02 UTC by Angelo
Modified: 2016-12-30 15:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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..)