Skip to content

Commit

Permalink
Fix EnumDevices structure dwSize
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Jun 15, 2024
1 parent 0a3a399 commit a031fe5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 61
#define BUILD_NUMBER 62
2 changes: 1 addition & 1 deletion IDirectInputX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ HRESULT m_IDirectInputX::EnumDevicesX(DWORD dwDevType, V lpCallback, LPVOID pvRe
CopyMemory(&DI, lpddi, lpddi->dwSize);

// Prevent DInput3 games from encountering a structure bigger than they might expect.
DI.dwSize = self->diVersion <= 0x300 ? sizeof(D) : sizeof(D_Old);
DI.dwSize = self->diVersion >= 0x0500 ? sizeof(D) : sizeof(D_Old);

DI.dwDevType = devType7 | (devSubType7 << 8) | hidDevice;

Expand Down

0 comments on commit a031fe5

Please sign in to comment.