From beedf615b25f1453943a7c45dbf0ae4773408138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 30 Sep 2021 10:37:37 +0200 Subject: [PATCH] dinput8/tests: Add some HID joystick IDirectInputDevice8_GetForceFeedbackState tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Alexandre Julliard --- 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 );