mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
This commit is contained in:
parent
7c261118e0
commit
051181fa6e
28 changed files with 74 additions and 56 deletions
|
@ -40,7 +40,7 @@ GUIModalMenu::GUIModalMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent,
|
|||
m_menumgr(menumgr),
|
||||
m_remap_dbl_click(remap_dbl_click)
|
||||
{
|
||||
m_gui_scale = g_settings->getFloat("gui_scaling");
|
||||
m_gui_scale = std::max(g_settings->getFloat("gui_scaling"), 0.5f);
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
float d = RenderingEngine::getDisplayDensity();
|
||||
m_gui_scale *= 1.1 - 0.3 * d + 0.2 * d * d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue