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/ControllerEmu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index 87378f86e0..6200ec2002 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -104,7 +104,7 @@ void ControllerEmu::ControlGroup::SaveConfig(IniFile::Section *sec, const std::s { if (s->is_virtual) continue; - sec->Set(group + s->name, s->value*100.0f, s->default_value*100.0f); + sec->Set(group + s->name, (float)s->value * 100.0f, (float)s->default_value * 100.0f); } for (auto& c : controls) @@ -113,7 +113,7 @@ void ControllerEmu::ControlGroup::SaveConfig(IniFile::Section *sec, const std::s sec->Set(group + c->name, c->control_ref->expression, ""); // range - sec->Set(group + c->name + "/Range", c->control_ref->range*100.0f, 100.0f); + sec->Set(group + c->name + "/Range", (float) (c->control_ref->range*100.0, 100.0)); } // extensions -- cgit v1.2.3