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
Fix max_formspec_size not taking gui_scaling into account #13493
Conversation
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.
The GUI looks as usual, thus LGTM.
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.
Tested, works.
One thing I noticed: When I'm in window mode, the fullscreenfs is still surrounded by a small boarder. (But that's prolly not relevant for this PR.)
Hi, please wait for me to test this |
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.
works well
Bump. This has now also been approved by rubenwardy, so I think it should be ready for merging. |
The
max_formspec_size
value returned byminetest.get_player_window_information()
is currently incorrect if the player has set thegui_scaling
setting to a value other than 1.That's because
prefer_imgsize
inGUIFormSpecMenu::regenerateGui
(link to the code) is scaled bygui_scaling
, butClientDynamicInfo::calculateMaxFSSize
(link to the code) doesn't care. This PR just adds a division bygui_scaling
tocalculateMaxFSSize
.This bug cannot be worked around by mods since mods don't get the
gui_scaling
, but only thereal_gui_scaling
(gui_scaling
* display density) of the player. Therefore, fixing this bug cannot not break any mods that already work around it.To do
This PR is a Ready for Review.
How to test
Set
gui_scaling
to 0.5.On the master branch, start Devtest and do
/testfullscreenfs
. The formspec won't be shown fullscreen.Do the same on this PR. The formspec will be shown fullscreen.