On Fri Aug 1 11:57:39 2025 +0000, Tyson Whitehead wrote:
Was thinking a bit more about this. A windows program can specify
- nothing,
- `DIPROPAUTOCENTER_OFF`, or
- `DIPROPAUTOCENTER_ON`
Clearly if the program explicitly specifies `DIPROPAUTOCENTER_ON` or `DIPROPAUTOCENTER_OFF` there is only one correct thing to do, and that is give it what it wants. So then, maybe this whole thing is really about what happens when nothing is specified? My initial patch had [this code](https://gitlab.winehq.org/wine/wine/-/blob/42a63687cd6991de03402d81bf79b773a...)
if (impl->base.autocenter == DIPROPAUTOCENTER_OFF) hid_joystick_send_force_feedback_command( iface, DISFFC_STOPALL, FALSE );
which makes it go
- nothing → autocenter on (just a DISFFC_RESET is sent)
but maybe what we really want is
if (impl->base.autocenter != DIPROPAUTOCENTER_ON) hid_joystick_send_force_feedback_command( iface, DISFFC_STOPALL, FALSE );
which would make it go
- nothing → autocenter off (DISFFC_RESET, and DISFFC_STOPALL are sent)
@TomaszPakula would this change give you correct behaviour for your devices with ETS2/ATS?
Wow. That wasn't though out. `impl->base.autocenter` is a boolean, so those two are exactly the same. Setting the initial value as in the comment below should be all that is required.