On Mon Jan 22 18:25:33 2024 +0000, Esme Povirk wrote:
> This doesn't look right to me. Assigning to desc overwrites the value
> passed into the function.
I will add a check if desc is already allocated or not, if yes then use realloc.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58440
On Mon Jan 22 18:34:33 2024 +0000, Esme Povirk wrote:
> I think all the cases except RedEyeCorrectionEffect can be combined into
> one case. I don't think the `default:` case should be reachable.
They can all be combined to one, if we don't use a union and use 'void *' as member of CGpEffect to store the parameter. I am a bit confused on how to merge the cases if we use a union.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_58439
Autocenter is a default effect playing on the device following power up or reset. It is disabled by stopping all effects. On at least some devices (all?) it is a spring effect playing in slot 1. Capturing Windows USB packets reveals it dinput acquire does (1) a reset (this enabled autocenter) and, if autocenter is disabled, (2) a stop all effects (this disabled autocenter).
This logic works regardless of whether autocenter is a spring effect playing in slot 1 or not. It does mean autocenter can only be set when the device is not acquired. Testing on Windows reveals setting autocenter properties while acquired returns DIERR_ACQUIRED even if the device is exclusively acquired, so this is consistent.
--
v4: dinput: Update tests for DIPROP_AUTOCENTER
dinput: Implement DIPROP_AUTOCENTER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4830
Fixes some test failures with https://gitlab.winehq.org/wine/wine/-/merge_requests/4904, where when the driver is found again for a new device (which has a different VID/PID from the first created device and thus, is not cached yet), the original filename from the .pnf file has been overwritten and the driver modules are incorrectly looked up for relative to the .inf in the `c:\windows\inf` folder.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4910