dinput: Send -1 for infinite durations in HID reports.
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
c188a87020
commit
a95f76094e
|
@ -2728,7 +2728,8 @@ static void set_parameter_value_us( struct hid_joystick_effect *impl, char *repo
|
||||||
LONG exp;
|
LONG exp;
|
||||||
if (!caps) return;
|
if (!caps) return;
|
||||||
exp = caps->units_exp;
|
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;
|
||||||
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 );
|
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_id = 3,
|
||||||
.report_len = 11,
|
.report_len = 11,
|
||||||
.report_buf = {0x03,0x01,0x02,0x08,0xff,0xff,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xd5},
|
.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[] =
|
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,
|
.code = IOCTL_HID_WRITE_REPORT,
|
||||||
.report_id = 3,
|
.report_id = 3,
|
||||||
.report_len = 11,
|
.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,
|
.wine_only = TRUE, .todo = TRUE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue