I initially thought there was an impedance mismatch between the HID based wine bus and autocenter as well due to autocenter not being part of the USB PID specification. That is, autocenter is communicated implicitly to the backend by HID messages over the bus - the front end sending a PID reset over the bus tells the backend it should also turn autocenter on, and - the front end sending sending PID a stop all effects over the bus tells the backend it should also turn autocenter off.
So, if `DIPROP_AUTOCENTER` is `DIPROPAUTOCENTER_ON`, acquisitions of the device causes the front end to just send a reset. This triggers a call to the SDL or udev input APIs in the backend to turn autocenter on, achieving the desired state. If `DIPROP_AUTOCENTER` is `DIPROPAUTOCENTER_OFF`, then acquisitions of the device causes the front end to send a reset followed by a stop all effects. This triggers calls to the SDL or udev input APIs in the backend to to first turn autocentering on (the rest) and then off (the stop all effects), achieving the final state of off as desired. These messages are also how it works in some PID devices (e.g., the Sidewinder 2) meaning autocenter also works on these devices under the udev hidraw backend.
As autocenter wasn't explicitly covered in the PID specification, the SDL and udev input backends are actual the preferred option for supporting it because autocentering is done via API call that dispatches to a kernel driver that knows how to correctly tell the device to turn autocentering on or off (grepping the kernel for autocenter and looking through the hits reveals there are many ways this in done). The udev hidraw backend is not preferred as it is only (1) good for PID devices that (2) have no PID quirks that need working around and (3) do autocenter on on reset and off on stop all effects. For this reason we don't want to strip autocenter support out of the SDL and udev backends as this is where it should really shine and just work for everything because the kernel drivers can make it work for each device.
Going back to how the front end and the back end communicate implicitly about autocenter, the reason I initially thought there was an impedance mismatch was because there appeared to be no way to communicate a leave-it-as-it-is situation. I believed this was be required if `DIPROP_AUTOCENTER` had never been set by the program. At some point, though, I realized, the front end never wants to communicate a leave-it-as-it-is to the backend as `DIPROP_AUTOCENTER` is always set to either `DIPROP_AUTOCENTER` was `DIPROPAUTOCENTER_ON`, so there is no impedance mismatch.
That is, under direct input, `DIPROP_AUTOCENTER` has an initial value of either `DIPROPAUTOCENTER_ON` or `DIPROPAUTOCENTER_OFF` and programs [can retrieve it](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ee417908...)). It is therefore entirely feasible that a program first checks the initial state of `DIPROP_AUTOCENTER` and then only sets it if it isn't already what it wants. These programs require the front end to have chosen an initial state for `DIPROP_AUTOCENTER` and to tell the backend to set that state upon acquisition to work correctly. So there is never a time at which acquisition of the device is made and the front end doesn't have an explicit autocenter state it wants the backend to set. There is no leave-it-as-it-is case. There is no impedance mismatch.
There is one issue though. We have to choose an initial value for `DIPROP_AUTOCENTER`, and we need to choose the same one Windows choose for each device. The reason is a good program would always check and set or just set regardless, but probably lots of programs don't as the developers never tested on any device that had a different initial value then they wanted under Windows. These programs are not going to work correctly under Wine if it uses a different initial value.
I hard coded the initial value to `DIPROPAUTOCENTER_ON` as this is what the initial value for was for my Sidewinder 2 under Windows. What is likely needed instead is a good heuristic, special cases for outliers, and an option for the user to specify it if all else fails. I expect it is this initial value that is the problem when users are complaining about autocenter being incorrectly stuck on for their device. Either that or the kernel driver is unable to turn it off after turning it on. If broken kernel drivers are common, then we probably want a way to disable the backend API calls for some devices too.
It is also true that Linux has no notion of taking ownership, so it is lacking in that regard too. This is an issue for someone wanting to simultaneously using the same FF device with two programs at once though, so I don't think it is really something that needs to be worried a lot about.
If you have a device and want to see what it's initial value is and if device acquisition correctly sets autocenter in all cases for a given backend, please see my [test program](https://github.com/twhitehead/issue-wine-ff-autocenter) and give it go. Even better, send me the log file. Knowing what happens on more devices is so critical to understanding what is going on, where we are at, and how best to make everything work going forward. Thanks so much!