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.
This commit is contained in:
Rachel Bryk
2014-08-11 13:43:26 -04:00
parent 64575d565a
commit 5adbc83453
16 changed files with 99 additions and 97 deletions

View File

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