You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (DisplayServer::get_singleton()->screen_get_dpi(screen) >= 192 && smallest_dimension >= 1400) {
// hiDPI display.
return2.0;
} elseif (smallest_dimension >= 1700) {
// Likely a hiDPI display, but we aren't certain due to the returned DPI.
// Use an intermediate scale to handle this situation.
return1.5;
} elseif (smallest_dimension <= 800) {
// Small loDPI display. Use a smaller display scale so that editor elements fit more easily.
// Icons won't look great, but this is better than having editor elements overflow from its window.
return0.75;
}
return1.0;
My smallest_dimension is 1440 and I have a dpi of 144, so it went into the fallback return : return 1.0;
Not sure if we can add some check to the else if (smallest_dimension >= 1700) to something like else if (smallest_dimension >= 1700 || dpi / 96 >= 1.5)
Steps to reproduce
Have the same hardware as mine and observe the auto display scale.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
Not sure if this bug report is just for the editor, but this proposal might be related for general automatic hiDPI scaling based on system/monitor: godotengine/godot-proposals#7968
I think maybe it's time to implement these two methods on Windows with GetScaleFactorForMonitor 😜
Getting and using real scale for monitor will not work without full DPI scaling support/SHC_PROCESS_PER_MONITOR_DPI_AWARE if you have more than one monitor, so implementing screen_get_scale without it is pointless, Windows will return false values and rescale it afterwards.
Tested versions
master
System information
Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 () - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
Issue description
Godot chooses a display scale of 1.0 despite I set my my windows to display at 150%
Sorry for the Chinese here, but you can see I have a 2560 * 1440 monitor and I set my windows to use a 150% display scale
But Godot still thinks 100% is the "Auto" one:
Looking at the code :
godot/editor/editor_settings.cpp
Lines 1522 to 1543 in 2543d19
My
smallest_dimension
is 1440 and I have a dpi of 144, so it went into the fallback return :return 1.0;
Not sure if we can add some check to the
else if (smallest_dimension >= 1700)
to something likeelse if (smallest_dimension >= 1700 || dpi / 96 >= 1.5)
Steps to reproduce
Have the same hardware as mine and observe the auto display scale.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: