From d938de67fff288bf7f0a92fd51a2e890a1b5f245 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 5 Oct 2017 16:41:42 -0300 Subject: [PATCH] Make sure to obey hidpi to off by default, as present in project settings. Set it to on by default for editor. Many integrated GPUs can't really get enough performance to play games at hidpi, so this should be enabled manually. --- core/os/os.cpp | 2 +- main/main.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/os/os.cpp b/core/os/os.cpp index 4accd65bab0..eb5d5be33df 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -541,7 +541,7 @@ OS::OS() { _render_thread_mode = RENDER_THREAD_SAFE; - _allow_hidpi = true; + _allow_hidpi = false; _stack_bottom = (void *)(&stack_bottom); _logger = NULL; diff --git a/main/main.cpp b/main/main.cpp index bc227060fea..e06f423bfcc 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -774,6 +774,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2); GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3); + if (editor) { + OS::get_singleton()->_allow_hidpi = true; //editors always in hidpi + } Engine::get_singleton()->_pixel_snap = GLOBAL_DEF("rendering/quality/2d/use_pixel_snap", false); OS::get_singleton()->_keep_screen_on = GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true); if (rtm == -1) {