On Thu Jul 31 16:27:31 2025 +0000, Piotr Caban wrote:
> I think it would be best to move these tests before other tests instead
> (and add comment mentioning that this should be the first test). The
> function returns error returned by last function that failed (or E_FAIL
> if there was none). The tests can be easily modified so ConnectionPoint
> tests return different error.
I can see in your patch that it's probably more complicated (the error is always the same if I move test_ADORecordsetConstruction before test_ConnectionPoint). Anyway, it's probably better to run ConnectionPoint tests first. Another option is to try to investigate what's happening there but I'm not sure if it's worth the effort.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8683#note_111715
I think it would be best to move these tests before other tests instead (and add comment mentioning that this should be the first test). The function returns error returned by last function that failed (or E_FAIL if there was none). The tests can be easily modified so ConnectionPoint tests return different error.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8683#note_111714
FFB Autocenter introduced in https://gitlab.winehq.org/wine/wine/-/merge_requests/4911
had one major misunderstanding.
The USB PID standard doesn't actually define any explicit way to
autocenter a device. One could of course use the spring effect with a
deadzone of 0 and dead band of 0. This is what I'm actually working on
for the Linux PID driver (spring + friction/damper).
Some devices implement autocenter in firmware when they receive the
DC Disable Actuators command. Very few, if not just one, implement this
weird autocenter effect on slot 1. This is, from what I can gather, only
implemented on the MS SideWinder joystick(s) and the Windows' USB PID
driver is created around these devices.
Windows PID driver is a bit out of spec, is quite permissive when it
comes to fields missing in the descriptor (basically, only effect types
and their effect type blocks are optional). Another thing it does is
handling of this out-of-spec autocentering for their joysticks.
Funnliy enough, the creator of the Linux PID driver based the initial
code on testing with MS Sidewinder so it's autocentering is supported.
This is where the autocentering mentioned in the MR comes from. It's not
the directinput api that does it but the Windows PID driver. As such,
autocentering on reset should be left to the drivers, not handeled by
Wine.
SDL lacks full reset support and Linux is even more barebones, whre it's
not even possible to query the device state, effects etc (something I'm
working on slowly). As such, when games send out RESET to prepare the
device, the device starts autocentering for no good reason and the
effect is not removed once other effect are uploaded and played which
would be the case for MS sidewinder.
In any case, even Windows in inconsistent and I think the directinput
documentation has some errors. directinput ffb api is largely based on
USB PID but:


Testing with my Moza Racing R9 wheelbase, the DC Reset PID command is
sent, but there's no DC Disable Actuators in sight. The games still
call reset then enable actuators though.
tl;dr
Set autocentering to 0 instead of max value when DISFFC_RESET is
received to remove the unwanted autocenter behavior.
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny(a)gmail.com>
--
v3: winebus: Do not touch autocenter on device init and device reset
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605
The per-device/vendor option list is allocated on the PE side and shared with the unix, it should be alright to access linked list from both side as winebus should not need and doesn't implement WOW64.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8686
FFB Autocenter introduced in https://gitlab.winehq.org/wine/wine/-/merge_requests/4911
had one major misunderstanding.
The USB PID standard doesn't actually define any explicit way to
autocenter a device. One could of course use the spring effect with a
deadzone of 0 and dead band of 0. This is what I'm actually working on
for the Linux PID driver (spring + friction/damper).
Some devices implement autocenter in firmware when they receive the
DC Disable Actuators command. Very few, if not just one, implement this
weird autocenter effect on slot 1. This is, from what I can gather, only
implemented on the MS SideWinder joystick(s) and the Windows' USB PID
driver is created around these devices.
Windows PID driver is a bit out of spec, is quite permissive when it
comes to fields missing in the descriptor (basically, only effect types
and their effect type blocks are optional). Another thing it does is
handling of this out-of-spec autocentering for their joysticks.
Funnliy enough, the creator of the Linux PID driver based the initial
code on testing with MS Sidewinder so it's autocentering is supported.
This is where the autocentering mentioned in the MR comes from. It's not
the directinput api that does it but the Windows PID driver. As such,
autocentering on reset should be left to the drivers, not handeled by
Wine.
SDL lacks full reset support and Linux is even more barebones, whre it's
not even possible to query the device state, effects etc (something I'm
working on slowly). As such, when games send out RESET to prepare the
device, the device starts autocentering for no good reason and the
effect is not removed once other effect are uploaded and played which
would be the case for MS sidewinder.
In any case, even Windows in inconsistent and I think the directinput
documentation has some errors. directinput ffb api is largely based on
USB PID but:


Testing with my Moza Racing R9 wheelbase, the DC Reset PID command is
sent, but there's no DC Disable Actuators in sight. The games still
call reset then enable actuators though.
tl;dr
Set autocentering to 0 instead of max value when DISFFC_RESET is
reveived to remove the unwanted autocenter behavior.
Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny(a)gmail.com>
--
v2: winebus: Set FFB autcenter to 0 instead of 100 on device reset.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8605
These are the first steps towards code sharing, finally :)
Patch 4 is a bit big, but it's just copying code from various source files into a single source file. I can attempt to split if if that's preferable for review purposes.
--
v4: d3dx10: Use shared d3dx code in get_image_info when possible.
d3dx9: Don't include d3dx9 header in d3dx_helpers.
d3dx9: Get rid of ID3DXBuffer usage in d3dx_helpers.
d3dx9: Move functions intended for code sharing into a separate source file.
d3dx9: Introduce d3dx_image_file_format enumeration.
d3dx9: Introduce d3dx_resource_type enumeration.
d3dx9: Replace D3DFORMAT constants with enum d3dx_pixel_format_id constants.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8490