libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.76k stars 1.81k forks source link

Moza R5, force feedback (haptic) works on linux, but is not working on windows 10 #8422

Closed Vladeeg closed 11 months ago

Vladeeg commented 12 months ago

I have Moza R5 racing wheel, and trying to get force feedback to work in some SDL2 applications.

I've tested it with PCSX2 and GIMX software. Both are using SDL2 for managing racing wheels and haptic effects.

Problem is that haptic effects (even constant left/right) are not working under windows 10, but are working under linux (Pop!OS 22.04).

In PCSX2 logs (under windows) it says that haptic effects are not supported by the device:

[    0.5391] (SDLInputSource) Opened joystick 0 (instance id 0, player id 0): MOZA R5 Base
[    0.5417] (SDLInputSource) Failed to create haptic left/right effect: Haptic: Effect not supported by haptic device.
[    0.5548] (SDLInputSource) No haptic rumble supported: Haptic: Effect not supported by haptic device.
[    0.5583] (SDLInputSource) Rumble is not supported on 'MOZA R5 Base'

GIMX logs are not so helpful, but seems like it's trying to do something:

Warning: skipping unsupported command SET_DEFAULT_SPRING
Warning: skipping unsupported command DEFAULT_SPRING_ON

< CONSTANT, level: -10320
> DOWNLOAD_AND_PLAY - slot 1 - VARIABLE - 0x52 0x80 0x00 0x00 0x00
> push: 10
> peek: 10
> remove 10
< CONSTANT, level: -11610
> DOWNLOAD_AND_PLAY - slot 1 - VARIABLE - 0x51 0x80 0x00 0x00 0x00
> push: 10
> peek: 10
> remove 10
Vladeeg commented 12 months ago

Interesting that if we do this modification to registry, force feedback starts working in GIMX and in PCSX2. (but "effect not supported" message is still present) Though, it's a bit weird in PCSX2: sometimes it just turns off and restarts after a bit of delay.

Original OEMData value is hex:03,00,88,11,80,00,00,00:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_346e&PID_0004]
"OEMData"=hex:43,00,88,01,fe,00,00,00
"OEMName"="MOZA R5 Base"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_346e&PID_0004]
"OEMData"=hex:43,00,88,01,fe,00,00,00
"OEMName"="MOZA R5 Base"
slouken commented 11 months ago

This sounds like a hardware or driver support issue. I'll go ahead and close this now. Feel free to reopen if you find it's a bug in SDL.