From: Tomasz Pakuła tomasz.pakula.oficjalny@gmail.com
--- dlls/dinput/tests/force_feedback.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 1deaca10c80..529c6277da7 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -1533,7 +1533,7 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO wait_hid_expect( file, 100 ); /* device gain reports are written asynchronously */ }
-static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DWORD version ) +static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DWORD version, DWORD dwAxes ) { struct hid_expect expect_create[] = { @@ -1556,7 +1556,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0x00}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0x00}, }, }; struct hid_expect expect_create_1[] = @@ -1573,7 +1573,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, }, }; struct hid_expect expect_create_2[] = @@ -1590,7 +1590,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xf1}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xf1}, }, }; struct hid_expect expect_create_3[] = @@ -1607,7 +1607,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0x00}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0x00}, }, }; struct hid_expect expect_create_4[] = @@ -1624,7 +1624,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, }, }; struct hid_expect expect_create_5[] = @@ -1641,7 +1641,7 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, + .report_buf = {0x03,0x01,0x03,1 << dwAxes + 1,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, }, }; struct hid_expect expect_destroy = @@ -3638,7 +3638,7 @@ static BOOL test_force_feedback_joystick( DWORD version )
test_constantforce_effect( device, file, version ); test_periodic_effect( device, file, version ); - test_condition_effect( device, file, version ); + test_condition_effect( device, file, version , caps.dwAxes );
set_hid_expect( file, expect_reset, sizeof(expect_reset) ); hr = IDirectInputDevice8_Unacquire( device ); @@ -4163,7 +4163,7 @@ static BOOL test_force_feedback_six_axes( DWORD version ) hr = IDirectInputDevice8_Acquire( device ); ok( hr == DI_OK, "Acquire returned: %#lx\n", hr );
- test_condition_effect( device, file, version ); + test_condition_effect( device, file, version , caps.dwAxes );
hr = IDirectInputDevice8_Unacquire( device ); ok( hr == DI_OK, "Unacquire returned: %#lx\n", hr );