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. --- .../InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp index 52960bbc3c..d9728dcbac 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp @@ -298,12 +298,12 @@ ControlState KeyboardMouse::Button::GetState() const ControlState KeyboardMouse::Axis::GetState() const { - return std::max(0.0f, ControlState(m_axis) / m_range); + return std::max(0.0, ControlState(m_axis) / m_range); } ControlState KeyboardMouse::Cursor::GetState() const { - return std::max(0.0f, ControlState(m_axis) / (m_positive ? 1.0f : -1.0f)); + return std::max(0.0, ControlState(m_axis) / (m_positive ? 1.0 : -1.0)); } void KeyboardMouse::Light::SetState(const ControlState state) -- cgit v1.2.3