-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce limits of settings that could cause buggy behaviour #12450
Conversation
I don't like the duplication of these limits here. |
9e0ec53
to
9a9195b
Compare
@Zughy A future PR might. After this one is merged, I will update that issue accordingly. |
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max of 20 too?
a03ed43
to
13a5eb8
Compare
+Fix chat text size
13a5eb8
to
e631315
Compare
Manually implementing this on the C++ side of things is error-prone code duplication. Couldn't C++ be made to read |
@appgurueu Could? Yes sure, it's possible if someone's willing to spend their time on it. A similar attempt (but much more into depth) was made in #6728. |
PR updated with limits to fix #12493 because the relevant C++ line was touched anyway. |
@SmallJoker please don't go lower than the default, or people can still cheat of half a second per block if they know about the parameter |
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
See: #9000 and #11463
Fixes #11738 and fixes #11739
To do
This PR is Ready for Review.
How to test