There are tests in dinput/tests that emulate a virtual HID PID device with various custom HID device descriptors. It can be a bit tedious and difficult to figure, but if you can find an actual HID PID device which has dinput auto-center support on Windows, using its descriptor could be a good starting point to figure the required HID features. Some people have also been successfully using Wireshark to monitor HID reports over USB with HID PID devices to figure the expected report sequences.
I bought an old MS Sidewinder FF2 off of EBay. It is a USB HID PID with device managed effect ids. I tried it on an old Windows laptop with USBPcap installed. It has auto-centering when plugged in. When you select it in MS's old fedit.exe program, it says it disables it, and it does. It also lets you run any of the effects. I captured sessions with USBPcap, but I think stuff must be being dropped, as what I get makes no sense
- unplugged device, stick move freely - plug in device, usb initializes, no HID items, power light comes on and auto-centering (stick no longer moves freely) - select it in fedit.exe, usb hid pid 0x7f feature get report (parameter block pools report), auto-centering goes off (stick moves freely) (linux does this exact same request, but auto-centering remains in effect with it) - add sine effect and play it, usb hid pid 0xab (create new effect parameter block) feature set report, usb hid pid 0x98 (effect parameter block load report) feature get report (reports id 1, while linux gives id 2, which seems to agree with auto-centering being off), effect plays on stick, but no command ever sent to disable auto-centering, set the effect type-specific parameter block, or actually start the effect playback that I can see - close program, stick resumes auto-centering, with no further hid reports - repeating gives the same packets
Here is a copy of the capture file from the above sessions if you want to see. I waited at least 10s between each action to clearly separate them. That gives you the USB HID reports for the Sidewinder FF2 too at time 38.536156
https://staff.sharcnet.ca/tyson/hidff3.cap
Maybe doing something similar in dinput is the way to go if that's truly how it works, although that is only going to work with device-managed effect ids (which I don't think we do with SDL / evdev backends).
That seems like the thing to do to me too.
Thanks! Tyson