Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy HID device flag in GetCapabilities #26

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading