mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fix the Post Processing shader configuration dialog.
On locales that don't use period as a separator this would break us. For vector values in a configuration, we use comma as a separator which causes the configuration to balloon to massive sizes due to never saving them correctly. Loading would then break since it would load a million configuration options. Fixes issue #7569.
This commit is contained in:
parent
7f68a357ad
commit
d348bfea46
@ -260,10 +260,16 @@ void PostProcessingShaderConfiguration::SaveOptionsConfiguration()
|
||||
break;
|
||||
case ConfigurationOption::OptionType::OPTION_FLOAT:
|
||||
{
|
||||
std::string value = "";
|
||||
std::ostringstream value;
|
||||
value.imbue(std::locale("C"));
|
||||
|
||||
for (size_t i = 0; i < it.second.m_float_values.size(); ++i)
|
||||
value += StringFromFormat("%f%s", it.second.m_float_values[i], i == (it.second.m_float_values.size() - 1) ? "": ", ");
|
||||
ini.GetOrCreateSection(section)->Set(it.second.m_option_name, value);
|
||||
{
|
||||
value << it.second.m_float_values[i];
|
||||
if (i != (it.second.m_float_values.size() - 1))
|
||||
value << ", ";
|
||||
}
|
||||
ini.GetOrCreateSection(section)->Set(it.second.m_option_name, value.str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user