summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2018-12-22 17:49:03 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2018-12-24 19:40:58 -0600
commit0f19c4a40f8b49247233ed1f36e3e7836b617014 (patch)
treeb38fdca0329424440b1897d9b15afe6d4205427c /Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
parentd5df56c6771372c2a0282495cbf6ff913aaf3368 (diff)
ControllerInterface: DInput: Update force feedback effects in a thread. This should prevent slowdowns experienced by a handful of users.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp6
1 files changed, 4 insertions, 2 deletions
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