Skip to content

Commit

Permalink
UI: Don't cap auto-config wizard FPS whole number precision at 2
Browse files Browse the repository at this point in the history
Capping the precision for whole numbers results in scientific notation
being used for any number that's larger than what can be displayed with
the given precision. In case of 2, that would be anything larger than
99, resulting in 120 for example to be shown as 1.2e+02.
Let's not cap the precision for whole numbers ourselves and just use the
default value (which at the time of writing would be 6).
  • Loading branch information
gxalpha authored and RytoEX committed Aug 12, 2023
1 parent 4f8b17d commit d2ef4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UI/window-basic-auto-config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ AutoConfigVideoPage::AutoConfigVideoPage(QWidget *parent)
(long double)ovi.fps_num / (long double)ovi.fps_den;

QString fpsStr = (ovi.fps_den > 1) ? QString::number(fpsVal, 'f', 2)
: QString::number(fpsVal, 'g', 2);
: QString::number(fpsVal, 'g');

ui->fps->addItem(QTStr(FPS_PREFER_HIGH_FPS),
(int)AutoConfig::FPSType::PreferHighFPS);
Expand Down

0 comments on commit d2ef4d2

Please sign in to comment.