1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

[macOS, 3.2] Implement seamless display scaling.

This commit is contained in:
bruvzg
2020-07-07 21:37:05 +03:00
parent 07b24de868
commit e9ab41b71d
9 changed files with 143 additions and 81 deletions

View File

@@ -5652,8 +5652,12 @@ EditorNode::EditorNode() {
switch (display_scale) {
case 0: {
// Try applying a suitable display scale automatically
#ifdef OSX_ENABLED
editor_set_scale(OS::get_singleton()->get_screen_max_scale());
#else
const int screen = OS::get_singleton()->get_current_screen();
editor_set_scale(OS::get_singleton()->get_screen_dpi(screen) >= 192 && OS::get_singleton()->get_screen_size(screen).x > 2000 ? 2.0 : 1.0);
#endif
} break;
case 1: {