Fix +/- buttons on float sliders not working at certain values (#3865)

This commit is contained in:
Josh Bodner 2024-02-01 18:14:17 -08:00 committed by GitHub
parent ed85a1b0e2
commit f8b0e586bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ namespace UIWidgets {
if (changed && !(abs(oldVal - val) < 0.000001f)) {
std::stringstream ss;
ss << std::setprecision(ticks) << val;
ss << std::setprecision(ticks + 1) << val;
val = std::stof(ss.str());
CVarSetFloat(cvarName, val);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();