Skip to content

Commit

Permalink
Fix lock location on FakeGetDeviceData
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Jun 22, 2024
1 parent a2b7b05 commit b8241f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7057
#define BUILD_NUMBER 7058
4 changes: 2 additions & 2 deletions dinput8/IDirectInputDevice8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ HRESULT m_IDirectInputDevice8::FakeGetDeviceData(DWORD cbObjectData, LPDIDEVICEO
return DI_OK;
}

Lock();

// Get latest ouse state from the DirectInput8 buffer
{
std::vector<DIDEVICEOBJECTDATA> dod;
Expand Down Expand Up @@ -182,8 +184,6 @@ HRESULT m_IDirectInputDevice8::FakeGetDeviceData(DWORD cbObjectData, LPDIDEVICEO
GetSystemTimeAsFileTime((FILETIME*)&fTime);
fTime = fTime / 1000;

Lock();

// Checking for overflow
if (rgdod == nullptr && *pdwInOut == 0)
{
Expand Down

0 comments on commit b8241f5

Please sign in to comment.