1
0
mirror of synced 2024-11-14 18:38:05 +01:00

Change how forced spring works

This commit is contained in:
Aaron M 2019-12-09 08:11:26 +13:00
parent b5280b57dd
commit 58af91c41d

View File

@ -294,6 +294,13 @@ DWORD WINAPI ThreadForLoop(LPVOID lpParam)
return 0;
}
DWORD WINAPI ForcedSpringLoop(LPVOID lpParam)
{
Sleep(2500);
ForceSpringEffect = true;
return 0;
}
static int sanfran(int ffsan) {
switch (ffsan) {
@ -1678,6 +1685,10 @@ void OutputReading::FFBLoop(EffectConstants* constants, Helpers* helpers, Effect
if (!init)
{
CreateThread(NULL, 0, ThreadForLoop, NULL, 0, NULL);
if (EnableForceSpringEffect == 1)
{
CreateThread(NULL, 0, ForcedSpringLoop, NULL, 0, NULL);
}
init = true;
}
@ -1784,12 +1795,6 @@ void OutputReading::FFBLoop(EffectConstants* constants, Helpers* helpers, Effect
if (EnableForceSpringEffect == 1)
{
if (stateFFB > 0)
{
ForceSpringEffect = true;
}
if (ForceSpringEffect)
{
triggers->Springi(ForceSpringStrength / 100.0);