Address c++20 warning, fix inaccurate range text display when slide == 0
This commit is contained in:
parent
ed51c2abda
commit
504095cea9
|
@ -611,10 +611,10 @@ void ConfigureInputPlayer::UpdateButtonLabels() {
|
||||||
if (!param.Has("range")) {
|
if (!param.Has("range")) {
|
||||||
param.Set("range", 0.50f);
|
param.Set("range", 0.50f);
|
||||||
}
|
}
|
||||||
|
// QtSlider returns values from 0.0-0.99. We want range to be from 50% to 150%
|
||||||
analog_stick_range->setValue(static_cast<int>(param.Get("range", 0.1f) * 100));
|
analog_stick_range->setValue(static_cast<int>(param.Get("range", 0.1f) * 100));
|
||||||
if (analog_stick_range->value() == 0) {
|
if (analog_stick_range->value() == 0) {
|
||||||
analog_stick_range_label->setText(tr("Range: 0%"));
|
analog_stick_range_label->setText(tr("Range: 50%"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!param.Has("modifier_scale")) {
|
if (!param.Has("modifier_scale")) {
|
||||||
|
|
Reference in New Issue