Skip to content

Commit 5c92ae1

Browse files
committed
Fix endless bumpstop damping force
1 parent fb532f6 commit 5c92ae1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

irFFB/irFFB.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ DWORD WINAPI readWheelThread(LPVOID lParam) {
226226
d *= DAMPING_MULTIPLIER * settings.getDampingFactor();
227227

228228
}
229+
else
230+
d = 0.0f;
229231

230232
}
231233

@@ -657,6 +659,8 @@ int APIENTRY wWinMain(
657659
logiEscape.lpvInBuffer = &logiLedData;
658660
logiEscape.cbInBuffer = sizeof(logiLedData);
659661

662+
InitializeCriticalSection(&effectCrit);
663+
660664
if (!InitInstance(hInstance, nCmdShow))
661665
return FALSE;
662666

@@ -693,8 +697,6 @@ int APIENTRY wWinMain(
693697
initVJD();
694698
SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
695699

696-
InitializeCriticalSection(&effectCrit);
697-
698700
SetThreadPriority(
699701
CreateThread(NULL, 0, readWheelThread, NULL, 0, NULL), THREAD_PRIORITY_HIGHEST
700702
);

0 commit comments

Comments
 (0)