From: Ivo Ivanov logos128@gmail.com
Fixes the Download method not sending an initial type specific HID PID report in the rare cases where all type specific params are set to 0 through the initial SetParameters call, so they aren't considered as modified. The "Set Envelope" report is an exception in this case, as the effect is not used when all params are set to 0.
FH5 is affected by this issue, since it initially sets the direction of its constant effect to 0, which translates to 0 magnitude in dinput. --- dlls/dinput/joystick_hid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 2065fe429eb..ba8a1e959e7 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2904,7 +2904,11 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX, impl->index, impl->joystick->preparsed, impl->effect_update_buf, report_len ); if (status != HIDP_STATUS_SUCCESS) hr = status; - else hr = DI_OK; + else + { + hr = DI_OK; + impl->modified |= impl->flags & ~DIEP_ENVELOPE; + } }
if (hr == DI_OK)