summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu.cpp
diff options
context:
space:
mode:
authorRachel Bryk <RachelBryk@gmail.com>2014-08-11 13:43:26 -0400
committerRachel Bryk <RachelBryk@gmail.com>2014-09-03 03:08:09 -0400
commit5adbc83453d14b23818442f545ceede0e4548196 (patch)
treebdc853c8e073ad09189a8f2811306105d061fbec /Source/Core/InputCommon/ControllerEmu.cpp
parent64575d565a47e582715aac003d8a0c55cc4ac2ca (diff)
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.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu.cpp4
1 files changed, 2 insertions, 2 deletions
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