dinput: Return a valid keyboard type in keyboard GetCapabilities.

This commit is contained in:
Lucas Zawacki 2012-08-20 03:52:17 -03:00 committed by Alexandre Julliard
parent 5b3ccdf04a
commit ac9a10f815
2 changed files with 3 additions and 3 deletions

View File

@ -375,9 +375,9 @@ static HRESULT WINAPI SysKeyboardWImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W ifa
devcaps.dwSize = lpDIDevCaps->dwSize;
devcaps.dwFlags = DIDC_ATTACHED | DIDC_EMULATED;
if (This->base.dinput->dwVersion >= 0x0800)
devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_UNKNOWN << 8);
devcaps.dwDevType = DI8DEVTYPE_KEYBOARD | (DI8DEVTYPEKEYBOARD_PCENH << 8);
else
devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_UNKNOWN << 8);
devcaps.dwDevType = DIDEVTYPE_KEYBOARD | (DIDEVTYPEKEYBOARD_PCENH << 8);
devcaps.dwAxes = 0;
devcaps.dwButtons = This->base.data_format.wine_df->dwNumObjs;
devcaps.dwPOVs = 0;

View File

@ -187,7 +187,7 @@ static void test_capabilities(LPDIRECTINPUT pDI, HWND hwnd)
ok (caps.dwFlags & DIDC_ATTACHED, "GetCapabilites dwFlags: 0x%08x\n", caps.dwFlags);
ok (LOWORD(LOBYTE(caps.dwDevType)) == DIDEVTYPE_KEYBOARD,
"GetCapabilities invalid device type for dwDevType: 0x%08x\n", caps.dwDevType);
todo_wine ok (LOWORD(HIBYTE(caps.dwDevType)) != DIDEVTYPEKEYBOARD_UNKNOWN,
ok (LOWORD(HIBYTE(caps.dwDevType)) != DIDEVTYPEKEYBOARD_UNKNOWN,
"GetCapabilities invalid device subtype for dwDevType: 0x%08x\n", caps.dwDevType);
if (pKeyboard) IUnknown_Release(pKeyboard);