dinput/tests: Added a test for DIPROP_JOYSTICKID.
This commit is contained in:
parent
2cd3b908ad
commit
e3d243861c
|
@ -180,6 +180,7 @@ static BOOL CALLBACK EnumJoysticks(
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
DIDEVICEINSTANCE inst;
|
DIDEVICEINSTANCE inst;
|
||||||
DIDEVICEINSTANCE_DX3 inst3;
|
DIDEVICEINSTANCE_DX3 inst3;
|
||||||
|
DIPROPDWORD dipw;
|
||||||
HWND hWnd = get_hwnd();
|
HWND hWnd = get_hwnd();
|
||||||
char oldstate[248], curstate[248];
|
char oldstate[248], curstate[248];
|
||||||
|
|
||||||
|
@ -205,6 +206,16 @@ static BOOL CALLBACK EnumJoysticks(
|
||||||
|
|
||||||
trace("---- %s ----\n", lpddi->tszProductName);
|
trace("---- %s ----\n", lpddi->tszProductName);
|
||||||
|
|
||||||
|
/* Test for joystick ID property */
|
||||||
|
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);
|
hr = IDirectInputDevice_SetDataFormat(pJoystick, NULL);
|
||||||
ok(hr==E_POINTER,"IDirectInputDevice_SetDataFormat() should have returned "
|
ok(hr==E_POINTER,"IDirectInputDevice_SetDataFormat() should have returned "
|
||||||
"E_POINTER, returned: %08x\n", hr);
|
"E_POINTER, returned: %08x\n", hr);
|
||||||
|
|
Loading…
Reference in New Issue