Module: wine Branch: master Commit: beedf615b25f1453943a7c45dbf0ae4773408138 URL: https://source.winehq.org/git/wine.git/?a=commit;h=beedf615b25f1453943a7c45d...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu Sep 30 10:37:37 2021 +0200
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetForceFeedbackState tests.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dinput8/tests/hid.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 080f2c944ca..918db40d444 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -4643,6 +4643,14 @@ static void test_simple_joystick(void) check_member( state, expect_state_rel[i], "%#x", rgbButtons[2] ); winetest_pop_context();
+ hr = IDirectInputDevice8_GetForceFeedbackState( device, NULL ); + todo_wine + ok( hr == E_POINTER, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr ); + res = 0xdeadbeef; + hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); + todo_wine + ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr ); + hr = IDirectInputDevice8_Unacquire( device ); ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
@@ -5656,6 +5664,9 @@ static void test_force_feedback_joystick( void ) hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); todo_wine ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr ); + hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); + todo_wine + ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
escape.dwSize = sizeof(DIEFFESCAPE); escape.dwCommand = 0; @@ -5685,6 +5696,10 @@ static void test_force_feedback_joystick( void ) hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph ); todo_wine ok( hr == 0x80040301, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr ); + res = 0xdeadbeef; + hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); + todo_wine + ok( hr == 0x80040301, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) ); hr = IDirectInputDevice8_Unacquire( device );