only write setup parameters that have changed

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6905 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ff3e447f7f4feeb58b4794d19beb8970a30ceed2
Former-commit-id: 6b0ce87eba8ce055325c5ca0fffb6847847a7e3c
This commit is contained in:
iobyte 2020-04-11 19:37:46 +00:00
parent b3d6bfa836
commit abedb23e91

View file

@ -372,7 +372,8 @@ void CarSetupMenu::storeSettings()
for (size_t index = 0; index < ITEMS_PER_PAGE; ++index)
{
attnum &att = items[page][index];
if (att.exists)
// Only write items that exist and have been changed.
if (att.exists && (att.value != att.defaultValue))
{
GfParmSetNum(hparmCarSetup, att.section.c_str(), att.param.c_str(), att.units.c_str(),
att.value, att.minValue, att.maxValue);