Rémi Bernon : dinput8/tests: Test effect creation with unacquired device.

Alexandre Julliard julliard at winehq.org
Mon Nov 15 16:01:28 CST 2021


Module: wine
Branch: master
Commit: 979b19ce73256a09a42cfa46dce0b12d705b32fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=979b19ce73256a09a42cfa46dce0b12d705b32fe

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Mon Nov 15 11:14:05 2021 +0100

dinput8/tests: Test effect creation with unacquired device.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dinput8/tests/hid.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index a4721b246eb..8aeebc62ab7 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -5696,7 +5696,8 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
     hr = IDirectInputDevice8_Unacquire( device );
     ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
     set_hid_expect( file, NULL, 0 );
-    hr = IDirectInputEffect_SetParameters( effect, &expect_desc, DIEP_DURATION | DIEP_NODOWNLOAD );
+    hr = IDirectInputEffect_SetParameters( effect, &expect_desc, DIEP_DURATION );
+    todo_wine
     ok( hr == DI_DOWNLOADSKIPPED, "SetParameters returned %#x\n", hr );
     set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
     hr = IDirectInputDevice8_Acquire( device );
@@ -6147,6 +6148,20 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO
         ok( ref == 0, "Release returned %d\n", ref );
         winetest_pop_context();
     }
+
+    set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
+    hr = IDirectInputDevice8_Unacquire( device );
+    ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
+    set_hid_expect( file, NULL, 0 );
+    hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, &expect_desc, &effect, NULL );
+    todo_wine
+    ok( hr == DI_OK, "CreateEffect returned %#x\n", hr );
+    ref = IDirectInputEffect_Release( effect );
+    ok( ref == 0, "Release returned %d\n", ref );
+    set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
+    hr = IDirectInputDevice8_Acquire( device );
+    ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
+    set_hid_expect( file, NULL, 0 );
 }
 
 static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DWORD version )




More information about the wine-cvs mailing list