Commit a95f7609 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Send -1 for infinite durations in HID reports.

parent c188a870
......@@ -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 );
......
......@@ -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,
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment