| Summary: | Haptic directions messed up on Linux | ||
|---|---|---|---|
| Product: | SDL | Reporter: | elboato |
| Component: | joystick | Assignee: | elboato |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: |
linux specific file for haptic
SDL_syshaptic.c for Linux |
||
|
Description
elboato
2009-12-30 13:55:08 UTC
Created attachment 478 [details]
linux specific file for haptic
Alright... I corrected SDL_SYS_ToDirection in SDL_syshaptic.c in the linux directory of haptic. Now in all 3 cases the same value is returned, at least. Therefore now it should behave the same way as on Windows. I added some comments and corrected the cases SDL_HAPTIC_CARTESIAN and SDL_HAPTIC_SPHERICAL. Could you upload the file I attached to the SVN, please? see http://bugzilla.libsdl.org/attachment.cgi?id=478 So now I still have another problem: my Joystick (Logitech Force 3D Pro) does only work correctly for the directions south, east and south-east. (values for directions on driver/system level: 0, 49151 (0xC000) and 57343 (0xE000). Well so far I only tried the 8 default directions. I'll take a closer look. I have no clue what might be the problem. Maybe it's the driver itself... Any ideas? All the best elboato (In reply to comment #2) > So now I still have another problem: my joystick (Logitech Force 3D Pro) does > only work correctly for the directions south, east and south-east. (values for > directions on driver/system level: 0, 49151 (0xC000) and 57343 (0xE000). Well > so far I only tried the 8 default directions. I'll take a closer look. I have > no clue what might be the problem. Maybe it's the driver itself... As I supposed: in SDL_SYS_HapticUpdateEffect the effect is uploaded with ioctl(haptic->hwdata->fd, EVIOCSFF, &linux_effect) and there the values in the struct linux_effect are okay. So the problem seems to be the driver for my joystick Logitech Force 3D Pro. Can anybody confirm that? If I'm right, I guess this bug is resolved with the file I attached before.... And can anybody suggest a joystick that works on linux? Which joysticks/gamepads were used/tested during the implementation of haptic for SDL? Thx in advance! elboato Created attachment 481 [details]
SDL_syshaptic.c for Linux
I added even more comments on the corrected conversion to Linux directions. This was tested on my Logitech Force 3D Pro Joystick and it should definitely work.
Your changes are in subversion, thanks! |