The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Joystick, Haptics and Windows
kehom


Joined: 15 Apr 2016
Posts: 1
Hello everyone,

For the past few days I have been working with SDL_Joystick and SDL_Haptics.
For the record, I have (at the moment) 3 devices to test with:
- XBox360
- Logitech G27 Steering Wheel
- Cheap, generic.. err... brandless, joypad (It does have haptic support and using "joy.cpl" windows tool it does give me some rumble)

Now, for the summary of what is going on here:

I enumerate the devices and then store their names (SDL_JoystickName()). The first weird thing comes already with the name.
The XBox360 is identified as a generic device (XInput Controller #1).
The steering wheel is correctly named and the brandless one, well... as expected!

Ok, all 3 devices are identified as being Haptic devices (which is correct).
So, then, I query and try to upload the supported effects.
With the 360 controller, only the LeftRight effect is supported and it's correctly uploaded. The effect also works (at least is seems to).
However, both the Logitech and the brandless ones return that only the LeftRight are not supported and still, none of the effects get uploaded.

Then, just out of curiosity, I added this:
Code:

SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "0");


Nothing changed for the steering wheel and the cheap controller.
However, for the 360, things are a bit different. It gets identified as a 360 controller however "SDL_JoystickIsHaptic()" returns false.


So, is there something I can do to at least make the haptic work consistently with the devices? The JoystickName() I can get away with it! Smile

Many thanks in advance

PS: I did run the testhaptic.c and results are somewhat the same as I have already stated.