mirror of https://github.com/PCSX2/pcsx2.git
INISettingsInterface: Use ToChars() for int/float conversion
Avoids locale issues.
This commit is contained in:
parent
af646e4496
commit
41a03c98f3
|
@ -158,25 +158,25 @@ bool INISettingsInterface::GetStringValue(const char* section, const char* key,
|
||||||
void INISettingsInterface::SetIntValue(const char* section, const char* key, int value)
|
void INISettingsInterface::SetIntValue(const char* section, const char* key, int value)
|
||||||
{
|
{
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
m_ini.SetLongValue(section, key, static_cast<long>(value), nullptr, false, true);
|
m_ini.SetValue(section, key, StringUtil::ToChars(value).c_str(), nullptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void INISettingsInterface::SetUIntValue(const char* section, const char* key, uint value)
|
void INISettingsInterface::SetUIntValue(const char* section, const char* key, uint value)
|
||||||
{
|
{
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
m_ini.SetLongValue(section, key, static_cast<long>(value), nullptr, false, true);
|
m_ini.SetValue(section, key, StringUtil::ToChars(value).c_str(), nullptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void INISettingsInterface::SetFloatValue(const char* section, const char* key, float value)
|
void INISettingsInterface::SetFloatValue(const char* section, const char* key, float value)
|
||||||
{
|
{
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
m_ini.SetDoubleValue(section, key, static_cast<double>(value), nullptr, true);
|
m_ini.SetValue(section, key, StringUtil::ToChars(value).c_str(), nullptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void INISettingsInterface::SetDoubleValue(const char* section, const char* key, double value)
|
void INISettingsInterface::SetDoubleValue(const char* section, const char* key, double value)
|
||||||
{
|
{
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
m_ini.SetDoubleValue(section, key, value, nullptr, true);
|
m_ini.SetValue(section, key, StringUtil::ToChars(value).c_str(), nullptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void INISettingsInterface::SetBoolValue(const char* section, const char* key, bool value)
|
void INISettingsInterface::SetBoolValue(const char* section, const char* key, bool value)
|
||||||
|
|
Loading…
Reference in New Issue