diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 3d90e721fb6..5ecf54e2281 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2728,7 +2728,8 @@ static void set_parameter_value_us( struct hid_joystick_effect *impl, char *repo LONG exp; if (!caps) return; exp = caps->units_exp; - if (caps->units != 0x1003) WARN( "unknown time unit caps %x\n", caps->units ); + if (value == INFINITE) value = caps->physical_min - 1; + else if (caps->units != 0x1003) WARN( "unknown time unit caps %x\n", caps->units ); else if (exp < -6) while (exp++ < -6) value *= 10; else if (exp > -6) while (exp-- > -6) value /= 10; set_parameter_value( impl, report_buf, caps, value ); diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 884a0100abe..26a5406fa57 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -5650,15 +5650,6 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO .report_id = 3, .report_len = 11, .report_buf = {0x03,0x01,0x02,0x08,0xff,0xff,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xd5}, - .todo = TRUE, - }, - /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 11, - .report_buf = {0x03,0x01,0x02,0x08,0x00,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xd5}, - .wine_only = TRUE, .todo = TRUE, }, }; struct hid_expect expect_set_envelope[] = @@ -5683,7 +5674,7 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x02,0x08,0x00,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xd5}, + .report_buf = {0x03,0x01,0x02,0x08,0xff,0xff,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xd5}, .wine_only = TRUE, .todo = TRUE, }, };