[PATCH 3/3] dinput/tests: Added a test for DIPROP_JOYSTICKID

Lucas Fialho Zawacki lfzawacki at gmail.com
Tue May 29 11:42:28 CDT 2012


From: Lucas Fialho Zawacki <lfzawacki at gmail.com>

---
 dlls/dinput/tests/joystick.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c
index c2f63c2..3e1456e 100644
--- a/dlls/dinput/tests/joystick.c
+++ b/dlls/dinput/tests/joystick.c
@@ -205,6 +205,21 @@ static BOOL CALLBACK EnumJoysticks(
 
     trace("---- %s ----\n", lpddi->tszProductName);
 
+    /* Test for joystick ID property */
+    {
+        DIPROPDWORD dipw;
+
+        ZeroMemory(&dipw, sizeof(dipw));
+
+        dipw.diph.dwSize = sizeof(DIPROPDWORD);
+        dipw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
+        dipw.diph.dwObj = 0;
+        dipw.diph.dwHow = DIPH_DEVICE;
+
+        hr = IDirectInputDevice_GetProperty(pJoystick, DIPROP_JOYSTICKID, &dipw.diph);
+        ok(SUCCEEDED(hr), "IDirectInputDevice_GetProperty() for DIPROP_JOYSTICKID failed\n");
+    }
+
     hr = IDirectInputDevice_SetDataFormat(pJoystick, NULL);
     ok(hr==E_POINTER,"IDirectInputDevice_SetDataFormat() should have returned "
        "E_POINTER, returned: %08x\n", hr);
-- 
1.7.9.5




More information about the wine-patches mailing list