Skip to content

Commit

Permalink
Copy HID device flag in GetCapabilities (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicknineTheEagle authored May 30, 2024
1 parent 678b9e5 commit e3b5f65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 57
#define BUILD_NUMBER 58
6 changes: 4 additions & 2 deletions IDirectInputDeviceX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ HRESULT m_IDirectInputDeviceX::GetCapabilities(LPDIDEVCAPS lpDIDevCaps)
{
DWORD devType = GET_DIDEVICE_TYPE(lpDIDevCaps->dwDevType);
DWORD devSubType = GET_DIDEVICE_SUBTYPE(lpDIDevCaps->dwDevType);
DWORD hidDevice = lpDIDevCaps->dwDevType & DIDEVTYPE_HID;
DWORD devType7 = ConvertDevTypeTo7(devType);
DWORD devSubType7 = ConvertDevSubTypeTo7(devType, devSubType);
lpDIDevCaps->dwDevType = devType7 | (devSubType7 << 8);
lpDIDevCaps->dwDevType = devType7 | (devSubType7 << 8) | hidDevice;
}

return hr;
Expand Down Expand Up @@ -645,9 +646,10 @@ HRESULT m_IDirectInputDeviceX::GetDeviceInfoX(V pdidi)
{
DWORD devType = GET_DIDEVICE_TYPE(pdidi->dwDevType);
DWORD devSubType = GET_DIDEVICE_SUBTYPE(pdidi->dwDevType);
DWORD hidDevice = pdidi->dwDevType & DIDEVTYPE_HID;
DWORD devType7 = ConvertDevTypeTo7(devType);
DWORD devSubType7 = ConvertDevSubTypeTo7(devType, devSubType);
pdidi->dwDevType = devType7 | (devSubType7 << 8);
pdidi->dwDevType = devType7 | (devSubType7 << 8) | hidDevice;
}

return hr;
Expand Down

0 comments on commit e3b5f65

Please sign in to comment.