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

fixes several scaling problems on multi monitor retina/non-retina setups on OS X

This commit is contained in:
Bernhard Liebl
2017-09-30 12:50:30 +02:00
committed by poke1024
parent 4c2b5491b5
commit a7f18798aa
4 changed files with 64 additions and 55 deletions

View File

@@ -4588,7 +4588,8 @@ EditorNode::EditorNode() {
{
int dpi_mode = EditorSettings::get_singleton()->get("interface/editor/hidpi_mode");
if (dpi_mode == 0) {
editor_set_scale(OS::get_singleton()->get_screen_dpi(0) >= 192 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x > 2000 ? 2.0 : 1.0);
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);
} else if (dpi_mode == 1) {
editor_set_scale(0.75);
} else if (dpi_mode == 2) {