From 0f19c4a40f8b49247233ed1f36e3e7836b617014 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 22 Dec 2018 17:49:03 -0600 Subject: ControllerInterface: DInput: Update force feedback effects in a thread. This should prevent slowdowns experienced by a handful of users. --- .../Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp index 9968bc798f..6de1f97d7e 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp @@ -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 -- cgit v1.2.3