On Thu Aug 7 19:15:21 2025 +0000, Tyson Whitehead wrote:
> I hacked together [some ugly Windows
> code](https://github.com/twhitehead/issue-wine-ff-autocenter) to test
> all possible setting of `DIPROP_AUTOCENTER` (not set, set
> `DIPROPAUTOCENTER_OFF`, and set `DIPROPAUTOCENTER_ON`). There is a
> precompiled version in the `bin` directory. It
> * gets the initial `DIPROP_AUTOCENTER` value and show that in a message box
> * acquires the device with the intial `DIPROP_AUTOCENTER` and prompts to continue,
> * acquires the device after setting `DIPROP_AUTOCENTER` to
> `DIPROPAUTOCENTER_OFF` and prompts to continue, and
> * acquires the device after setting `DIPROP_AUTOCENTER` to
> `DIPROPAUTOCENTER_ON` and prompts to continue.
> For the original Wine code, there was perfect agreement using my USB
> Sidewinder 2
> * the default value is `DIPROPAUTOCENTER_ON`,
> * when acquired without setting `DIPROP_AUTOCENTER` the default value, I
> feel the spring effect,
> * when acquired after explicitly setting `DIPROPAUTOCENTER_OFF`, I feel
> it go limp, and
> * when acquired after explicitly setting `DIPROPAUTOCENTER_ON`, I feel
> the spring effect.
> Based on this merged code, I would expect it will now be stuck in
> `DIPROPAUTOCENTER_ON` for older kernels and `DIPROPAUTOCENTER_OFF` for
> newer kernels.
This is not a wine issue though and I think you're still missing the dofference between hidraw and SDL/udev buses.
Your device will work perfectly with hidraw as it goes around system drivers and in this casez wine handles THE driver. Cheers
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112407
On Thu Aug 7 19:08:42 2025 +0000, Rémi Bernon wrote:
> Fwiw you can create different device types in the tests and check
> whether autocenter has a different default value, but I suspect like
> @TomaszPakula says, that it's just unspecified behavior. The DInput
> autocenter feature doesn't seem to be well defined, even on the HID PID
> side, and sends a generic (reset / stop all) command that drivers are
> free to interpret the way they like.
I hacked together [some ugly Windows code](https://github.com/twhitehead/issue-wine-ff-autocenter) to test all possible setting of `DIPROP_AUTOCENTER` (not set, set `DIPROPAUTOCENTER_OFF`, and set `DIPROPAUTOCENTER_ON`). There is a precompiled version in the `bin` directory. It
* gets the initial `DIPROP_AUTOCENTER` value and show that in a message box
* acquires the device with the intial `DIPROP_AUTOCENTER` and prompts to continue,
* acquires the device after setting `DIPROP_AUTOCENTER` to `DIPROPAUTOCENTER_OFF` and prompts to continue, and
* acquires the device after setting `DIPROP_AUTOCENTER` to `DIPROPAUTOCENTER_ON` and prompts to continue.
For the original Wine code, there was perfect agreement using my USB Sidewinder 2
* the default value is `DIPROPAUTOCENTER_ON`,
* when acquired without setting `DIPROP_AUTOCENTER` the default value, I feel the spring effect,
* when acquired after explicitly setting `DIPROPAUTOCENTER_OFF`, I feel it go limp, and
* when acquired after explicitly setting `DIPROPAUTOCENTER_ON`, I feel the spring effect.
Based on this merged code, I would expect it will now be stuck in `DIPROPAUTOCENTER_ON` for older kernels and `DIPROPAUTOCENTER_OFF` for newer kernels.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112406
On Thu Aug 7 19:05:40 2025 +0000, Tomasz Pakuła wrote:
> You're thinking too much. It's no the default of the Windows/API but how
> drivers behave. A lot of wheels use custom protocol and they can do
> whatever they want with autocenter and PID wheels just don't support any
> explicit autocenter method. It's more likelay an omission on the part of
> developer that still works because wheel manufacturers work around it.
> The current handling of autocenter is correct and works in all three
> cases (hidraw/SDL/udev).
Fwiw you can create different device types in the tests and check whether autocenter has a different default value, but I suspect like @TomaszPakula says, that it's just unspecified behavior. The DInput autocenter feature doesn't seem to be well defined, even on the HID PID side, and sends a generic (reset / stop all) command that drivers are free to interpret the way they like.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112404
On Thu Aug 7 19:03:03 2025 +0000, Tyson Whitehead wrote:
> My thinking is that the default under Windows in `DIPROPAUTOCENTER_ON`
> for joysticks and `DIPROPAUTOCENTER_OFF` for wheels. Could this be possible?
> It would perfectly explain @TomaszPakula issue of his wheel not working
> the same under Windows (no autocentering) and Wine (autocentering) for
> his truck simulations assuming ETS2/ATS doesn't explicitly set it as the
> developers only tested wheels on Windows and therefore assumed it would
> be off.
You're thinking too much. It's no the default of the Windows/API but how drivers behave. A lot of wheels use custom protocol and they can do whatever they want with autocenter and PID wheels just don't support any explicit autocenter method. It's more likelay an omission on the part of developer that still works because wheel manufacturers work around it.
The current handling of autocenter is correct and works in all three cases (hidraw/SDL/udev).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112403
On Thu Aug 7 18:58:37 2025 +0000, Rémi Bernon wrote:
> It is the default value because that's what makes the tests to pass.
> Setting `DIPROPAUTOCENTER_OFF` by default doesn't pass the tests. The
> tests also pass on Windows so we can conclude that it's also
> `DIPROPAUTOCENTER_ON` by default on Windows.
My thinking is that the default under Windows in `DIPROPAUTOCENTER_ON` for joysticks and `DIPROPAUTOCENTER_OFF` for wheels. Could this be possible?
It would perfectly explain @TomaszPakula issue of his wheel not working the same under Windows (no autocentering) and Wine (autocentering) for his truck simulations assuming ETS2/ATS doesn't explicitly set it as the developers only tested wheels on Windows and therefore assumed it would be off.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112402
On Thu Aug 7 18:53:47 2025 +0000, Tyson Whitehead wrote:
> Right. It makes sense that not setting `DIPROR_AUTOCENTER` under Wine
> gives the same result as setting it to `DIPROPAUTOCENTER_ON` because I
> made `DIPROPAUTOCENTER_ON` on the [default
> value](https://gitlab.winehq.org/wine/wine/-/blob/42a63687cd6991de03402d81b…
> when I first implemented `DIPROR_AUTOCENTER`. I also strongly suspect
> that it is this default value that is what is actually wrong and needs fixing.
It is the default value because that's what makes the tests to pass. Setting `DIPROPAUTOCENTER_OFF` by default doesn't pass the tests. The tests also pass on Windows so we can conclude that it's also `DIPROPAUTOCENTER_ON` by default on Windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112401
On Thu Aug 7 18:53:47 2025 +0000, Rémi Bernon wrote:
> I think we have tests which explicitly set DIPROP_AUTOCENTER, and some
> which don't, and it seems that when it's not set the HID PID reports
> that are sent to the device are the same as when DIPROP_AUTOCENTER is
> set to `DIPROPAUTOCENTER_ON`.
Right. It makes sense that not setting `DIPROR_AUTOCENTER` under Wine gives the same result as setting it to `DIPROPAUTOCENTER_ON` because I made `DIPROPAUTOCENTER_ON` on the [default value](https://gitlab.winehq.org/wine/wine/-/blob/42a63687cd6991de03402d81b… when I first implemented `DIPROR_AUTOCENTER`. I also strongly suspect that it is this default value that is what is actually wrong and needs fixing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605#note_112400