mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 13:24:06 +00:00
dinput: Always send both "Type Specific" and "Set Effect" reports on initial Download.
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. 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.
This commit is contained in:
parent
a146f9b6f1
commit
cd75ed1800
|
@ -2993,6 +2993,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
|
||||||
case PID_USAGE_ET_SAWTOOTH_DOWN:
|
case PID_USAGE_ET_SAWTOOTH_DOWN:
|
||||||
case PID_USAGE_ET_CONSTANT_FORCE:
|
case PID_USAGE_ET_CONSTANT_FORCE:
|
||||||
case PID_USAGE_ET_RAMP:
|
case PID_USAGE_ET_RAMP:
|
||||||
|
if (!(impl->flags & DIEP_ENVELOPE)) break;
|
||||||
if (!(impl->modified & DIEP_ENVELOPE)) break;
|
if (!(impl->modified & DIEP_ENVELOPE)) break;
|
||||||
|
|
||||||
set_parameter_value( impl, impl->set_envelope_buf, set_envelope->attack_level_caps,
|
set_parameter_value( impl, impl->set_envelope_buf, set_envelope->attack_level_caps,
|
||||||
|
@ -3100,7 +3101,7 @@ static HRESULT WINAPI hid_joystick_effect_Unload( IDirectInputEffect *iface )
|
||||||
else hr = DIERR_INPUTLOST;
|
else hr = DIERR_INPUTLOST;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl->modified = impl->flags;
|
impl->modified = ~0;
|
||||||
impl->index = 0;
|
impl->index = 0;
|
||||||
check_empty_force_feedback_state( joystick );
|
check_empty_force_feedback_state( joystick );
|
||||||
}
|
}
|
||||||
|
@ -3161,6 +3162,7 @@ static HRESULT hid_joystick_create_effect( IDirectInputDevice8W *iface, IDirectI
|
||||||
impl->params.rgdwAxes = impl->axes;
|
impl->params.rgdwAxes = impl->axes;
|
||||||
impl->params.rglDirection = impl->directions;
|
impl->params.rglDirection = impl->directions;
|
||||||
impl->params.dwTriggerButton = -1;
|
impl->params.dwTriggerButton = -1;
|
||||||
|
impl->modified = ~0;
|
||||||
impl->status = 0;
|
impl->status = 0;
|
||||||
|
|
||||||
*out = &impl->IDirectInputEffect_iface;
|
*out = &impl->IDirectInputEffect_iface;
|
||||||
|
|
|
@ -367,7 +367,6 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
|
||||||
.report_id = 5,
|
.report_id = 5,
|
||||||
.report_len = 2,
|
.report_len = 2,
|
||||||
.report_buf = {0x05,0x00},
|
.report_buf = {0x05,0x00},
|
||||||
.todo = TRUE,
|
|
||||||
},
|
},
|
||||||
/* set envelope */
|
/* set envelope */
|
||||||
{
|
{
|
||||||
|
@ -375,7 +374,6 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
|
||||||
.report_id = 6,
|
.report_id = 6,
|
||||||
.report_len = 7,
|
.report_len = 7,
|
||||||
.report_buf = {0x06,0x00,0x00,0x00,0x00,0x00,0x00},
|
.report_buf = {0x06,0x00,0x00,0x00,0x00,0x00,0x00},
|
||||||
.todo = TRUE,
|
|
||||||
},
|
},
|
||||||
/* update effect */
|
/* update effect */
|
||||||
{
|
{
|
||||||
|
@ -393,7 +391,6 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
|
||||||
.report_id = 5,
|
.report_id = 5,
|
||||||
.report_len = 2,
|
.report_len = 2,
|
||||||
.report_buf = {0x05,0x00},
|
.report_buf = {0x05,0x00},
|
||||||
.todo = TRUE,
|
|
||||||
},
|
},
|
||||||
/* update effect */
|
/* update effect */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue