dinput: Mark effect parameters as modified when duration is set.
Even if it doesn't actually change. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52061 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0059dc2567
commit
13aea4844a
|
@ -2554,7 +2554,7 @@ static HRESULT WINAPI hid_joystick_effect_SetParameters( IDirectInputEffect *ifa
|
|||
|
||||
if (flags & DIEP_DURATION)
|
||||
{
|
||||
if (impl->params.dwDuration != params->dwDuration) impl->modified |= DIEP_DURATION;
|
||||
impl->modified |= DIEP_DURATION;
|
||||
impl->params.dwDuration = params->dwDuration;
|
||||
}
|
||||
if (flags & DIEP_GAIN)
|
||||
|
|
|
@ -6471,6 +6471,15 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
|
|||
hr = IDirectInputEffect_SetParameters( effect, &expect_desc, 0 );
|
||||
ok( hr == DI_OK, "SetParameters returned %#x\n", hr );
|
||||
wait_hid_expect( file, 100 ); /* these updates are sent asynchronously */
|
||||
desc = expect_desc;
|
||||
desc.dwDuration = INFINITE;
|
||||
desc.dwTriggerButton = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( 0 ) | DIDFT_FFEFFECTTRIGGER,
|
||||
hr = IDirectInputEffect_SetParameters( effect, &desc, DIEP_NODOWNLOAD|DIEP_DURATION|DIEP_TRIGGERBUTTON );
|
||||
ok( hr == DI_DOWNLOADSKIPPED, "SetParameters returned %#x\n", hr );
|
||||
set_hid_expect( file, expect_update, sizeof(expect_update) );
|
||||
hr = IDirectInputEffect_SetParameters( effect, &expect_desc, 0 );
|
||||
ok( hr == DI_OK, "SetParameters returned %#x\n", hr );
|
||||
wait_hid_expect( file, 100 ); /* these updates are sent asynchronously */
|
||||
|
||||
desc = expect_desc;
|
||||
desc.lpEnvelope = &envelope;
|
||||
|
|
Loading…
Reference in New Issue