From 5adbc83453d14b23818442f545ceede0e4548196 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Mon, 11 Aug 2014 13:43:26 -0400 Subject: Change ControlState typedef to double, and change all related floats/doubles to use it. Fixes an off by 1 issue related to double->float->double conversion, and eliminates numerous warnings. --- Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp index 1ff48877db..ecd5db838c 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp @@ -266,7 +266,7 @@ std::string Joystick::Hat::GetName() const ControlState Joystick::Axis::GetState() const { - return std::max(0.0f, ControlState(m_axis - m_base) / m_range); + return std::max(0.0, ControlState(m_axis - m_base) / m_range); } ControlState Joystick::Button::GetState() const -- cgit v1.2.3