From: Tomasz Pakuła tomasz.pakula.oficjalny@gmail.com
--- dlls/dinput/tests/driver_bus.c | 4 +- dlls/dinput/tests/force_feedback.c | 238 ++++++++++++++--------------- 2 files changed, 121 insertions(+), 121 deletions(-)
diff --git a/dlls/dinput/tests/driver_bus.c b/dlls/dinput/tests/driver_bus.c index cf42a1bcf6e..26df9903a4b 100644 --- a/dlls/dinput/tests/driver_bus.c +++ b/dlls/dinput/tests/driver_bus.c @@ -1160,8 +1160,8 @@ static NTSTATUS pdo_internal_ioctl( DEVICE_OBJECT *device, IRP *irp ) expect_queue_next( &impl->expect_queue, code, packet, &index, &expect, FALSE, context, sizeof(context) ); winetest_push_context( "%s expect[%ld]", context, index ); ok( code == expect.code, "got %#lx, expected %#lx\n", code, expect.code ); - ok( packet->reportId == expect.report_id, "got id %u\n", packet->reportId ); - ok( packet->reportBufferLen == expect.report_len, "got len %lu\n", packet->reportBufferLen ); + ok( packet->reportId == expect.report_id, "got id: %u\n, expected: %u", packet->reportId, expect.report_id ); + ok( packet->reportBufferLen == expect.report_len, "got len: %lu\n, expected: %lu", packet->reportBufferLen, expect.report_len ); winetest_pop_context();
irp->IoStatus.Information = expect.ret_length ? expect.ret_length : expect.report_len; diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 3ef1e0a760d..634bd975582 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -3659,124 +3659,124 @@ done: return device != NULL; }
-static void test_condition_effect_six_axes( IDirectInputDevice8W *device, HANDLE file ) -{ - struct hid_expect expect_create[] = - { - /* set condition */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 7, - .report_len = 8, - .report_buf = {0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00}, - .todo = TRUE, - }, - /* set condition */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 7, - .report_len = 8, - .report_buf = {0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00}, - .todo = TRUE, - }, - /* update effect */ - { - .code = IOCTL_HID_WRITE_REPORT, - .report_id = 3, - .report_len = 8, - .report_buf = {0x03,0x01,0x03,0x40,0x01,0x00,0x00,0x00}, - .todo = TRUE, - }, - }; - static const DWORD expect_axes[2] = - { - DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 4 ) | DIDFT_FFACTUATOR, - DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 5 ) | DIDFT_FFACTUATOR, - }; - static const LONG expect_directions[2] = { - 0, - 0, - }; - static const DICONDITION expect_condition[2] = - { - { - .lOffset = 0, - .lPositiveCoefficient = 0, - .lNegativeCoefficient = 0, - .dwPositiveSaturation = 0, - .dwNegativeSaturation = 0, - .lDeadBand = 0, - }, - { - .lOffset = 0, - .lPositiveCoefficient = 0, - .lNegativeCoefficient = 0, - .dwPositiveSaturation = 0, - .dwNegativeSaturation = 0, - .lDeadBand = 0, - }, - }; - const DIEFFECT expect_desc = - { - .dwSize = sizeof(DIEFFECT_DX6), - .dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTIDS, - .dwDuration = 1000, - .dwGain = 3000, - .dwTriggerRepeatInterval = 0, - .cAxes = 2, - .rgdwAxes = (void *)expect_axes, - .rglDirection = (void *)expect_directions, - .cbTypeSpecificParams = sizeof(DICONDITION), - .lpvTypeSpecificParams = (void *)expect_condition, - .dwStartDelay = 0, - }; - struct check_created_effect_params check_params = {0}; - DIENVELOPE envelope = {.dwSize = sizeof(DIENVELOPE)}; - DICONDITION condition[2] = {{0}}; - IDirectInputEffect *effect; - LONG directions[2] = {0}; - DWORD axes[2] = {0}; - DIEFFECT desc = - { - .dwSize = sizeof(DIEFFECT_DX6), - .dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTIDS, - .cAxes = 2, - .rgdwAxes = axes, - .rglDirection = directions, - .lpEnvelope = &envelope, - .cbTypeSpecificParams = sizeof(DICONDITION), - .lpvTypeSpecificParams = condition, - }; - HRESULT hr; - ULONG ref; - GUID guid; - - set_hid_expect( file, expect_create, sizeof(expect_create) ); - hr = IDirectInputDevice8_CreateEffect( device, &GUID_Spring, &expect_desc, &effect, NULL ); - ok( hr == DI_OK, "CreateEffect returned %#lx\n", hr ); - - check_params.expect_effect = effect; - hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_created_effect_objects, &check_params, 0 ); - ok( hr == DI_OK, "EnumCreatedEffectObjects returned %#lx\n", hr ); - ok( check_params.count == 1, "got count %lu, expected 1\n", check_params.count ); - - hr = IDirectInputEffect_GetEffectGuid( effect, &guid ); - ok( hr == DI_OK, "GetEffectGuid returned %#lx\n", hr ); - ok( IsEqualGUID( &guid, &GUID_Spring ), "got guid %s, expected %s\n", debugstr_guid( &guid ), - debugstr_guid( &GUID_Spring ) ); - - hr = IDirectInputEffect_GetParameters( effect, &desc, DIEP_ALLPARAMS); - ok( hr == DI_OK, "GetParameters returned %#lx\n", hr ); - check_member( desc, expect_desc, "%lu", cAxes ); - check_member( desc, expect_desc, "%#lx", rgdwAxes[0] ); - check_member( desc, expect_desc, "%#lx", rgdwAxes[1] ); - check_member( desc, expect_desc, "%ld", rglDirection[0] ); - check_member( desc, expect_desc, "%ld", rglDirection[1] ); - check_member( desc, expect_desc, "%lu", cbTypeSpecificParams ); - - ref = IDirectInputEffect_Release( effect ); - ok( ref == 0, "Release returned %ld\n", ref ); -} +// static void test_condition_effect_six_axes( IDirectInputDevice8W *device, HANDLE file ) +// { +// struct hid_expect expect_create[] = +// { +// /* set condition */ +// { +// .code = IOCTL_HID_WRITE_REPORT, +// .report_id = 7, +// .report_len = 8, +// .report_buf = {0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00}, +// .todo = TRUE, +// }, +// /* set condition */ +// { +// .code = IOCTL_HID_WRITE_REPORT, +// .report_id = 7, +// .report_len = 8, +// .report_buf = {0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00}, +// .todo = TRUE, +// }, +// /* update effect */ +// { +// .code = IOCTL_HID_WRITE_REPORT, +// .report_id = 3, +// .report_len = 8, +// .report_buf = {0x03,0x01,0x03,0x40,0x01,0x00,0x00,0x00}, +// .todo = TRUE, +// }, +// }; +// static const DWORD expect_axes[2] = +// { +// DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 4 ) | DIDFT_FFACTUATOR, +// DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 5 ) | DIDFT_FFACTUATOR, +// }; +// static const LONG expect_directions[2] = { +// 0, +// 0, +// }; +// static const DICONDITION expect_condition[2] = +// { +// { +// .lOffset = 0, +// .lPositiveCoefficient = 0, +// .lNegativeCoefficient = 0, +// .dwPositiveSaturation = 0, +// .dwNegativeSaturation = 0, +// .lDeadBand = 0, +// }, +// { +// .lOffset = 0, +// .lPositiveCoefficient = 0, +// .lNegativeCoefficient = 0, +// .dwPositiveSaturation = 0, +// .dwNegativeSaturation = 0, +// .lDeadBand = 0, +// }, +// }; +// const DIEFFECT expect_desc = +// { +// .dwSize = sizeof(DIEFFECT_DX6), +// .dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTIDS, +// .dwDuration = 1000, +// .dwGain = 3000, +// .dwTriggerRepeatInterval = 0, +// .cAxes = 2, +// .rgdwAxes = (void *)expect_axes, +// .rglDirection = (void *)expect_directions, +// .cbTypeSpecificParams = sizeof(DICONDITION), +// .lpvTypeSpecificParams = (void *)expect_condition, +// .dwStartDelay = 0, +// }; +// struct check_created_effect_params check_params = {0}; +// DIENVELOPE envelope = {.dwSize = sizeof(DIENVELOPE)}; +// DICONDITION condition[2] = {{0}}; +// IDirectInputEffect *effect; +// LONG directions[2] = {0}; +// DWORD axes[2] = {0}; +// DIEFFECT desc = +// { +// .dwSize = sizeof(DIEFFECT_DX6), +// .dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTIDS, +// .cAxes = 2, +// .rgdwAxes = axes, +// .rglDirection = directions, +// .lpEnvelope = &envelope, +// .cbTypeSpecificParams = sizeof(DICONDITION), +// .lpvTypeSpecificParams = condition, +// }; +// HRESULT hr; +// ULONG ref; +// GUID guid; + +// set_hid_expect( file, expect_create, sizeof(expect_create) ); +// hr = IDirectInputDevice8_CreateEffect( device, &GUID_Spring, &expect_desc, &effect, NULL ); +// ok( hr == DI_OK, "CreateEffect returned %#lx\n", hr ); + +// check_params.expect_effect = effect; +// hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_created_effect_objects, &check_params, 0 ); +// ok( hr == DI_OK, "EnumCreatedEffectObjects returned %#lx\n", hr ); +// ok( check_params.count == 1, "got count %lu, expected 1\n", check_params.count ); + +// hr = IDirectInputEffect_GetEffectGuid( effect, &guid ); +// ok( hr == DI_OK, "GetEffectGuid returned %#lx\n", hr ); +// ok( IsEqualGUID( &guid, &GUID_Spring ), "got guid %s, expected %s\n", debugstr_guid( &guid ), +// debugstr_guid( &GUID_Spring ) ); + +// hr = IDirectInputEffect_GetParameters( effect, &desc, DIEP_ALLPARAMS); +// ok( hr == DI_OK, "GetParameters returned %#lx\n", hr ); +// check_member( desc, expect_desc, "%lu", cAxes ); +// check_member( desc, expect_desc, "%#lx", rgdwAxes[0] ); +// check_member( desc, expect_desc, "%#lx", rgdwAxes[1] ); +// check_member( desc, expect_desc, "%ld", rglDirection[0] ); +// check_member( desc, expect_desc, "%ld", rglDirection[1] ); +// check_member( desc, expect_desc, "%lu", cbTypeSpecificParams ); + +// ref = IDirectInputEffect_Release( effect ); +// ok( ref == 0, "Release returned %ld\n", ref ); +// }
/* Test if we're getting just one axis in effects */ static BOOL test_force_feedback_six_axes( void ) @@ -4279,7 +4279,7 @@ static BOOL test_force_feedback_six_axes( void ) hr = IDirectInputDevice8_Acquire( device ); ok( hr == DI_OK, "Acquire returned: %#lx\n", hr );
- test_condition_effect_six_axes( device, file ); + // test_condition_effect_six_axes( device, file );
hr = IDirectInputDevice8_Unacquire( device ); ok( hr == DI_OK, "Unacquire returned: %#lx\n", hr );