summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2013-01-07 12:25:18 +1100
committerskidau <skidau@gmail.com>2013-01-07 12:25:18 +1100
commit5240e75be20791d5226e7ac589a09a102755edf2 (patch)
treef2f38df76213d0bb3f2d68f49ff0f642d03c1e60 /Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
parent7a957134968963a1c53f635afbb91c53b15d9e2b (diff)
Fixed the infinite rumble problem caused by r4d6056f14625.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
index b7ac3bf82e..af6ee7e77c 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/DInput/DInputJoystick.cpp
@@ -535,11 +535,7 @@ ControlState Joystick::Hat::GetState() const
void Joystick::ForceConstant::SetState(const ControlState state)
{
- float force = abs(state - 0.5) * 2;
- if (state < 0.5)
- force = -force;
-
- const LONG new_val = LONG(10000 * force);
+ const LONG new_val = LONG(10000 * state);
LONG &val = params.lMagnitude;
if (val != new_val)