ControllerInterface: DInput: Update force feedback effects in a thread. This should prevent slowdowns experienced by a handful of users.

This commit is contained in:
Jordan Woyak
2018-12-22 17:49:03 -06:00
parent d5df56c677
commit 0f19c4a40f
5 changed files with 184 additions and 88 deletions

View File

@ -150,6 +150,8 @@ Joystick::Joystick(/*const LPCDIDEVICEINSTANCE lpddi, */ const LPDIRECTINPUTDEVI
Joystick::~Joystick()
{
DeInitForceFeedback();
m_device->Unacquire();
m_device->Release();
}
@ -265,5 +267,5 @@ ControlState Joystick::Hat::GetState() const
return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2);
}
}
}
} // namespace DInput
} // namespace ciface