Comment 2 for bug 1441161

Revision history for this message
Owen Williams (ywwg) wrote :

Check here for how the conversion is currently done: https://github.com/mixxxdj/mixxx/blob/master/src/dlgprefcontrols.cpp#L377

You don't really have to add an entry to the config file, you can just call setValue and getValueString from the dialog code with whatever name you want and that entry will be created in the config. When you read the value from the config, you can specify a default value in case it's not in the config file. So you'll have to come up with a way to try to read RateRangeDecimal from the config, and if it doesn't exist, fall back on RageRange, and if that doesn't exist, use the default value.

I was thinking the value would be "12" for 12%, which is stored in the mixxx engine as 0.12. So the fractional value is multiplied by 100 so it can be stored in the config file as a whole number.

RateRangeDecimal will take precedence.