Validate 'ttf resolution' option value

pull/541/head
Andrei Kortunov 6 years ago
parent 8da099713e
commit f89393fd62

@ -309,7 +309,7 @@ namespace MWGui
// to allow to configure font size via config file, without need to edit XML file.
// Also we should take UI scaling factor in account
int resolution = Settings::Manager::getInt("ttf resolution", "GUI");
resolution = std::max(0, resolution);
resolution = std::min(960, std::max(48, resolution));
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");

@ -27,7 +27,7 @@ ttf resolution
--------------
:Type: integer
:Range: > 0
:Range: 48 to 960
:Default: 96
Allows to specify resolution for in-game TrueType fonts.

Loading…
Cancel
Save