Skip to content

Commit

Permalink
Fix endless bumpstop damping force
Browse files Browse the repository at this point in the history
  • Loading branch information
nlp80 committed Oct 21, 2018
1 parent fb532f6 commit 5c92ae1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions irFFB/irFFB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ DWORD WINAPI readWheelThread(LPVOID lParam) {
d *= DAMPING_MULTIPLIER * settings.getDampingFactor();

}
else
d = 0.0f;

}

Expand Down Expand Up @@ -657,6 +659,8 @@ int APIENTRY wWinMain(
logiEscape.lpvInBuffer = &logiLedData;
logiEscape.cbInBuffer = sizeof(logiLedData);

InitializeCriticalSection(&effectCrit);

if (!InitInstance(hInstance, nCmdShow))
return FALSE;

Expand Down Expand Up @@ -693,8 +697,6 @@ int APIENTRY wWinMain(
initVJD();
SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);

InitializeCriticalSection(&effectCrit);

SetThreadPriority(
CreateThread(NULL, 0, readWheelThread, NULL, 0, NULL), THREAD_PRIORITY_HIGHEST
);
Expand Down

0 comments on commit 5c92ae1

Please sign in to comment.