Fixed the infinite rumble problem caused by r4d6056f14625.

This commit is contained in:
skidau
2013-01-07 12:25:18 +11:00
parent 7a95713496
commit 5240e75be2
4 changed files with 23 additions and 11 deletions

View File

@ -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)