Fix cases of assigning get_float_pref() to a float variable

It's called "get_float_pref" because it returns a floating-point.
However, that floating-point is in double precision.
This commit is contained in:
2023-01-21 20:18:16 -05:00
parent 577ff1a405
commit d88ec6a08d
5 changed files with 8 additions and 8 deletions

View File

@@ -1233,7 +1233,7 @@ void pick_preferences() {
}
cLedGroup& uiScale = dynamic_cast<cLedGroup&>(prefsDlog["scaleui"]);
float ui_scale = get_float_pref("UIScale", 1.0);
double ui_scale = get_float_pref("UIScale", 1.0);
if (ui_scale>0.95 && ui_scale<1.05) uiScale.setSelected("1");
else if (ui_scale>1.45 && ui_scale<1.55) uiScale.setSelected("1_5");
else if (ui_scale>1.95 && ui_scale<2.05) uiScale.setSelected("2");
@@ -1242,7 +1242,7 @@ void pick_preferences() {
else uiScale.setSelected("other");
cLedGroup& uiMapScale = dynamic_cast<cLedGroup&>(prefsDlog["scalemap"]);
float ui_map_scale = get_float_pref("UIScaleMap", 1.0);
double ui_map_scale = get_float_pref("UIScaleMap", 1.0);
if (ui_map_scale>0.95 && ui_map_scale<1.05) uiMapScale.setSelected("1");
else if (ui_map_scale>1.45 && ui_map_scale<1.55) uiMapScale.setSelected("1_5");
else if (ui_map_scale>1.95 && ui_map_scale<2.05) uiMapScale.setSelected("2");